开发者

jQuery Menu, Prevent constant loading

开发者 https://www.devze.com 2023-04-07 03:42 出处:网络
I have made a jQuery menu, Looks great, works a treat. The only problem I have i开发者_Go百科s when a user mouse\'s over it, It tends to \"Bounce\" quite a bit on a few mouseOver and mouseOuts, becomi

I have made a jQuery menu, Looks great, works a treat. The only problem I have i开发者_Go百科s when a user mouse's over it, It tends to "Bounce" quite a bit on a few mouseOver and mouseOuts, becoming slightly annoying and to a point where we may have to scrap it.

Does anyone know a way to stop it, or certainly slow it down.

An example is here :

http://jsfiddle.net/rtcjr/

Thanks in advance.


To stop animation use jquery stop()

And maybe http://cherne.net/brian/resources/jquery.hoverIntent.html plugin helps you:

hoverIntent is a plug-in that attempts to determine the user's intent... like a crystal ball, only with mouse movement! It works like (and was derived from) jQuery's built-in hover. However, instead of immediately calling the onMouseOver function, it waits until the user's mouse slows down enough before making the call.

0

精彩评论

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

关注公众号