Created
October 5, 2017 09:02
-
-
Save MjHead/ca13339614a63ff282cd2a040ab3aeb9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function doubleClickMenu( $jqEvent ) { | |
var $parentNode = $( this ), | |
$menuToggle = $parentNode.closest( '.menu' ).prev( '.menu-toggle' ), | |
menuIndex = $parentNode.index(); | |
if ( 'inline-block' !== $menuToggle.css( 'display' ) ) { | |
if ( menuIndex !== parseInt( $parentNode.data( 'index' ), 10 ) ) { | |
$jqEvent.preventDefault(); | |
} | |
$parentNode.data( 'index', menuIndex ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment