Home arrow JavaScript arrow Controlling Mouseout Events with HoverIntent`s Timeout Argument
JAVASCRIPT

Controlling Mouseout Events with HoverIntent`s Timeout Argument


In this fourth installment of the series, you will learn how to further customize the behavior of the “hoverIntent” jQuery plug-in by tweaking its “timeout” argument. This parameter can be used for assigning different delays to “mouseout” events, which can help you build more usable and accessible rollovers.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 1
June 02, 2010
TABLE OF CONTENTS:
  1. · Controlling Mouseout Events with HoverIntent`s Timeout Argument
  2. · Review: hoverIntent and interval
  3. · Delaying mouseout events with the timeout parameter
  4. · Binding the previous JavaScript snippet to a web page

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Controlling Mouseout Events with HoverIntent`s Timeout Argument
(Page 1 of 4 )

With a huge number of jQuery plug-ins available today that allow developers to perform all sorts of clever (and sometimes extremely complex) tasks on web pages, it’s hard to pick one that doesn’t make you deal with a steep learning curve and master a bunch of features that are overkill. Of course, not all the plug-ins are created in the same way, and “hoverIntent,” a small library created by Brian Cherne is a good example of this.

What’s more, “hoverIntent” will let you create delayed rollovers on your web pages by using a single method and a few intuitive arguments -- and most of the arguments are entirely optional. To be frank, this handy plug-in can be run right out of the box without having to leave the comfortable environment that made jQuery so popular, as it behaves like a powerful replacement for the library’s “hover” event handler.

Logically, if you've already had the chance to take a peek at the previous parts of this series, it’s quite probable that you already know how to build more usable rollovers with “hoverIntent” and how to tweak its “sensitivity” and “interval” arguments. In those tutorials I discussed these topics in depth, as usual via a decent variety of code samples.

While admittedly, the plug-in does a great job when used in its default configuration, it’s fair to say that eventually it will be necessary to change its behavior to fit the needs of a particular project. As you saw before, part of this customization process can be accomplished by using the “sensitivity” and “interval” parameters; however the plug-in provides an additional argument.

This new argument is called “timeout.” It permits you to specify a delay in milliseconds for “mouseout” events. This ability comes in especially handy, for instance, when creating more accessible drop-down menus. Considering how helpful this argument can be in different situations, in the lines to come I’m going to demonstrate how to work with it through some easy examples.               

Ready to learn how to further customize the “hoverIntent” plug-in? Then, don’t waste more time in preliminaries; start reading right now!


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Tutorials for Beginners
- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 8 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials