I am using Ariel Flesler’s ScrollTo jQuery plugin. Everything is great except when scrolling, the animation drags the cursor over some links which, having :hover triggers, cause a momentary hang up in the animation. Any chance anyone knows how to disable elements :hover functions while the animation is happening?
I am using Ariel Flesler’s ScrollTo jQuery plugin. Everything is great except when scrolling,
Share
When you say the links have “:hover triggers”, do you mean you’ve defined a CSS :hover rule or that you’ve bound a JavaScript function to the hover event?
If it’s CSS, what properties are you setting that causes the hanging (I can’t duplicate the hanging on my machine with a simple font-size change). As far as I can tell, you can’t prevent a CSS :hover.
If it’s JavaScript, can’t you just unbind the event before calling scrollTo?
A little more elaboration or an example would be useful.
Edit:
Okay, in response to your comment, basically you have to
unbindthemouseenterandmouseleaveevents before you usescrollTo:Demo
Visit http://demos.flesler.com/jquery/scrollTo/#target-examples and run the following code in Firebug.
You can then click on the “test scroll” link to test the code. You should see that the browser does not hang when the mouse hovers over the rest of the links.
When the scrolling stops you can click on any of the “go back” links and it will scroll back, except this time it will not unbind the hover events, so you the browser should hang.
Note: I did not experience any hanging at all. Are you using a slow computer or an older version of jquery perhaps? Let me know if the demo works as expected.