A port of jQuery hoverIntent
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Source
README.md
mootools-core-1.4.5-full-nocompat.js
mootools-more-1.4.0.1.js
package.yml

README.md

HoverIntent for mootools

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.

Screenshot

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>