jQuery isHovered Plugin

Summary

A jQuery plugin to test if an element is currently hovered.

Author

Chad Smith (email)

Requires

Download

jquery-ishovered.js (729 bytes)

License

Dual licensed under the MIT and GPL licenses.

Usage

Test if an element is hovered using:

$(selector).isHovered();

Or:

$.isHovered(selector);

Version History

Example 1

Link 1 Link 2 Span 1 Span 2

Is Link 1 hovered? N

Is Span 2 hovered? N

Is any A element hovered? N

Is any SPAN or A element in Example 1 hovered? N

Are any of the examples hovered? N

Is Example 2 hovered? N

Is Example 3 hovered? N

Example 2

You moved the mouse!

I will fade out in 3 seconds if the mouse doesn't move and you are hovering me.

Example 3

You moved the mouse!

I will fade out in 2 seconds if the mouse doesn't move and you are not hovering me.

© 2010 Mktg Dept