Created
June 10, 2016 12:45
-
-
Save theStreets93/063ab7a0868bb58cc55d5d6e667643f0 to your computer and use it in GitHub Desktop.
Magento RWD Theme - Delay on Top Navigation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mouseEnterAction: function(event, target) { | |
if(this.useSmallScreenBehavior()) { | |
return; // don't do mouse enter functionality on smaller screens | |
} | |
window.mytimeout = setTimeout(function(){ | |
$j(target).addClass('menu-active'); //show current menu | |
}, 300); | |
}, | |
mouseLeaveAction: function(event, target) { | |
if(this.useSmallScreenBehavior()) { | |
return; // don't do mouse leave functionality on smaller screens | |
} | |
clearTimeout(window.mytimeout); | |
$j(target).removeClass('menu-active'); //hide all menus | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment