jQuery animation menu queue problem
I've read like 15 topics about it. Finaly I turn my own thing, but.. Look at the code.
$("#top_menu .top_menu_elements>ul>li")
.mouseenter(function(){
$(this).find(".moreMenu").stop(true,true).show(250);
})
.mouseleave(function(){
$(this).find(".moreMenu").stop(true,true).hide(250);
});
HTML:
<div id="top_menu">
<div class="top_menu_elements">
<ul>
<li><a href="#" title="Site1">Site1</a></li>
<li>
<a href="#" title="Site2">Site2</a>
<div class开发者_开发问答="moreMenu">
Bla bla bla menu stuff
</div>
</li>
<li>
<a href="#" title="Site3">Site3</a>
<div class="moreMenu">
Bla bla bla menu stuff
</div>
</li>
</ul>
</div>
</div>
And.. It works fine. But try to enter different duration times like show(250) hide(50). When you rush mouse for a while over this menu it goes mad. I've tried callback, things with queue and dequeue, also with stop. Nothing seems to help - sth goes wrong. It should work with different times, but it doesn't. Any ideas?
your code seems to be working fine.
look here: http://jsfiddle.net/maniator/3vcpE/
精彩评论