HoverIntent 0.1

This is a port of jQuery HoverIntent http://cherne.net/brian/resources/jquery.hoverIntent.html

hoverIntent is a plug-in 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 making the call. Why? To delay or prevent the accidental firing of animations or ajax calls. Simple timeouts work for small areas, but if your target area is large it may execute regardless of intent.



Details

Author
Jakob Holmelund
Current version
0.1
GitHub
jakobholmelund/mootools-HoverIntent
Downloads
1076
Category
Interface
Tags
Report
GitHub Issues

Releases


Dependencies

  • _self_/_current_: core/1.4.3: [Class, Event]

How to use

<script type="text/javascript">
    window.addEvent("domready", function() {
        $$('#featured li').each(function(li){
            li.hoverIntent(
                over: function(e){},   
                timeout: 500, // number = milliseconds delay before onMouseOut    
                out: function(e){} 
            );
        })
    });
</script>

<ul id="featured"> 
    <li></li>
    <li></li>
    <li></li>
    <li></li>
</ul>

Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus