Created
March 14, 2015 17:46
-
-
Save terehof/19b15d5efb0e7bbf362a to your computer and use it in GitHub Desktop.
js snippet
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
if(window.matchMedia('(max-width: 768px)').matches) { | |
$('.sub-menu-button').on('click',function(e) { | |
var subMenu = $(this).next('.sub-navigation'); | |
if(subMenu.is(':visible')) { | |
subMenu.slideUp(); | |
} else { | |
subMenu.slideDown(); | |
} | |
return false; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment