jquery stop() causes hover effects to stop
Using the co开发者_运维问答de at http://jsfiddle.net/eSbps/ I am having an issue.
Basically its a menu system that, when you hover over the top levels, the second levels are shown through slideDown('slow');
however to remove the queuing effect i am using stop(true, false)
.
The issue is that when you hover over it again, the animation will only run to the point it was stopped at.
To remove the queuing effect, change your slideDown selector to ul:not(:animated)
.
try this approach: http://css-tricks.com/full-jquery-animations/
In short, you can't .stop(true, false)
with a slide like that, you have to make it go all the way using .stop(true, true)
or the previous height is going to be the value it stopped at (not the original value), and is what it'll animate back to.
精彩评论