Jqueryには、子ではないmouseout()特定の関数を超えたときに関数のアクティブ化を停止する方法があります。div私のhtmlコード。
<div class="featured">
<div class="featured_top">
<p><span class="theme">Theme</span> Transparent </p>
</div>
<div class="pic" style="background: blue">
<!-- image -->
</div>
<div class="featured_des">
<p> this is awesome theme </p>
</div>
</div>
私のjs(jQuery)
$(document).ready(function(){
$(".pic").mouseover(function(){
$(this).animate({
width: 0
});
});
$(".pic").mouseout(function(){
$(this).animate({
width: 214
});
});
});
だから私の質問は、それがdivのmouseout()ときに関数がアクティブになるのを止めることができるかということです。featured_desatmは.picクラスの幅をアニメーション化しますが、これは正常に機能しますが、終了animateするとカーソルが上にあり、featured_desがアクティブにmouseoutなり、説明が再び非表示になります。
例:: http ://www.grubber.co.nz/developer/_social_development/market.html