WHAT?
hoverIntent is a function that attempts to determine the user's intent...
like a crystal ball, only with mouse movement! It works like (and was
derived from) jQuery's built-in hover. However, instead of immediately
calling the onMouseOver function, it waits until the user's mouse slows down
enough before calling the function.

WHERE?
My sorely out-dated web site.
<http://cherne.net/brian/resources/jquery.hoverIntent.html>

WHY?
To delay or prevent the accidental firing of animations or ajax calls.
Simple timers work for small areas, but if your target area is large it may
execute regardless of intent. Also, because jQuery animations cannot be
stopped once they've started it's best not to start them prematurely. ...
and I wanted something that was easy to swap in/out with hover (so
hoverIntent returns the same "this" and event objects as hover).

WHAT'S NEXT?
Your feedback! Tear it shreds! Tell me what you think. I would like to keep
the script as small as possible, but if I could make this more useful (and
more likely to be used) I'm happy to make some enhancements... like...
- more compelling/verbose demo/documentation
- ability to override default settings (sensitivity, polling interval, etc)
- option of a simple onMouseOut timer
- make it more jQuery $-friendly (first few attempts have failed)
- suggestions for code style/commenting/optimization


Thanks in advance,
Brian.
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to