Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using hoverIntent with .on or delegate

How would you use hoverIntent with this:

    $mainNav.on('mouseenter', '.hEvent', function () {
       //Do stuff
    });
like image 972
Lawrence Avatar asked Jan 06 '12 19:01

Lawrence


1 Answers

Use the "selector" option for event delegation.

$mainNav.hoverIntent({
        over: function() {

        },
        out: function(){

        },
        selector: '.hEvent'
});

Source: hoverIntent Documentation

like image 120
Francisco Hodge Avatar answered Oct 19 '22 02:10

Francisco Hodge