The hoverIntent plugin

Earlier, I pointed out that one problem with our menu was how quickly the menu reacted to the mouseover event. Any time the mouse is moved over the menu, the nested menus open. While that might seem like a good thing at first, it might be disconcerting or surprising to site visitors if they are simply moving their mouse on the screen and aren't intending to use the drop-down or fly-out menu.

The Superfish plugin has built-in support for the hoverIntent plugin. The hoverIntent plugin sort of pauses the mouseover event and makes the page wait to see if the mouse slows down or stops on an item to make sure it's what the site visitor intended to do. That way if the site visitor just happens to roll his/her mouse over the drop-down ...

Get jQuery for Designers Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.