奇妙なもの:私のサイトでは、位置は機能しますが、マウスオーバーとz-indexは機能しません。フィドルでは、マウスオーバーは機能しますが、位置は機能しません。
jQueryが選択できなくなる原因となるCSS設定が欠落していますか?
私はそれがただ悪いコードか私が知らないニュアンスであることを望んでいます。
よろしくお願いします!
html
<div style="text-align: center; position: relative">
<span id="selectSupplierNameSpan" style="z-index:100">
Vendor
</span>
<div id="selectSupplierNameContainer" style="position: absolute; opacity: 0; z-index:50">
<input type="text" id="selectSupplierName" ></input>
</div>
</div>
jQuery
$("#selectSupplierNameContainer").position({
my: "center",
at: "center",
of: $("#selectSupplierNameSpan"),
});
$("#selectSupplierNameSpan").mouseover(function() {
var thisHeight = $("#selectSupplierNameContainer").height();
$("#selectSupplierNameContainer").animate({
opacity: 1,
top: "+=" + thisHeight
}, 500);
});
編集
jquery 1.7.2に移動し、ui 1.18を追加しましたが、マウスオーバーが機能しなくなりました。