Created
January 17, 2014 15:59
-
-
Save 8lane/8475875 to your computer and use it in GitHub Desktop.
Disable click on Wordpress parent navigation items for touch screens + bigger than 768px
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
var supportsTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints, | |
docWidth = jQuery(document).width(); | |
if ( supportsTouch && docWidth > 768 ) jQuery('#navigation .parent').on('click',function(e) { e.preventDefault(); }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment