jquery,在淡入/淡出期间禁用/忽略悬停事件? [英] Jquery, disable / ignore hover event during fade in / out?
问题描述
我试图找出这是否可能..我有一个图像映射,基于某些部分的盘旋而淡入/淡出......问题是当用户在淡入淡出就完成了它正在做的淡入淡出,然后是鼠标移动到的区域。如果用户在几个不同的区域之间快速移动,那么淡入淡出看起来真的很尴尬,所以我希望能够禁用悬停事件(淡入淡出)期间,另一个淡入淡出,所以它只是忽略它。
我想过使用某种延迟,但我不'我知道这是否可以工作,因为我认为它会延迟淡出..任何意见赞赏。
你指的是队列堆积问题。尝试在动画之前使用 stop
方法方法例如:
$(...)。stop()。fadeIn();
更多信息:
http://www.learningjquery.com/2009/01/quick -tip-prevent-animation-queue-buildup
至于流畅的动画,你可以去 jQuery Easing Plugin 。
I'm trying to figure out if this is possible.. I have an image map that does fade in / fade out based on hovers over certain parts.. the problem is that when the user hovers to a different area during the fade it finishes the fade it was doing then does the one for the area the mouse was moved to.. if the user moves quickly between a few different areas then the fades appear really jumpy and awkward, so I want to be able to disable the hover event (the fade) during the time that another fade is going on so it just ignores it..
I have thought about using some sort of delay but I don't know if this can work since I would think it would delay the fade too.. any advice is appreciated.
I think you are referring to queue buildup problem there. Try using the stop
method before the animation method eg:
$(...).stop().fadeIn();
More Info:
http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup
As for smooth animation, you can go for jQuery Easing Plugin.
这篇关于jquery,在淡入/淡出期间禁用/忽略悬停事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!