The jQuery hoverIntent plugin

Posted by ayaz on Aug 9, 2009 in Web development, taskeedo, web ui |

While working on the Web UI for Taskeedo, we noticed an inconsistent behaviour with triggering of animations in response to hover events. The problem was that if the mouse cursor went past the target area multiple times at a fast speed, the hover event would get triggered multiple times in succession and queue up, giving the effect that the resulting animation stays stuck — while in actuality, the animation would be appearing and disappearing too quickly for the human eye to observe. The result was a bad UI experience.

I looked around and found some half-baked solutions to the problem that involved triggering the event only when the cursor moved slowly over the target area. But, those didn’t feel satisfying. It was then when I bumped into the jQuery hoverIntent plugin. It not only solves the problem in question eloquently, but also provides a great deal of flexibility through providing configuration settings. It has definitely solved the problem for us.

Don’t you just love jQuery? :)

Tags: , , ,

Reply

Copyright © 2010 Rounded Labs All rights reserved.