开发者

jquery stop() causes hover effects to stop

开发者 https://www.devze.com 2023-01-13 10:47 出处:网络
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(\

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号