我有一個DIV,裏面的div我有一個<a>
,我想顯示鼠標<a>
在上格如何在div上顯示<a>帶有實時功能?
<div style="position: relative">
<img width="40" height="40" style="cursor:pointer" title="fwe" alt="image" src="../Images/DefaultPhotoMale.png" id="img513a06fa7f6d160310e09ac9">
<a style="position: absolute;display:none; top: 1px; margin-left: 50px;">X</a>
</div>
我這樣做,但我沒有得到正確的結果,我能夠看到未來的div另一方面,任何其他選項,請
$("#mycarousel").find("div").live({
mouseenter:
function() {
$(this).find('a').show();
},
mouseleave:
function() {
$(this).find('a').hide();
}
}
);
.live()已貶值** **在jQuery 1.7 - http://api.jquery.com/live/ – adamb 2013-03-08 15:57:35