Skip to content

Instantly share code, notes, and snippets.

@bradpotter
Created August 10, 2013 23:57
Show Gist options
  • Save bradpotter/6202720 to your computer and use it in GitHub Desktop.
Save bradpotter/6202720 to your computer and use it in GitHub Desktop.
jQuery script for Primary Navigation Menu
jQuery(document).ready(function($) {
$("#menu-primary-navigation").before('<div id="primary-menu-icon"></div>');
$("#primary-menu-icon").click(function() {
$(".menu-primary").slideToggle();
});
$(window).resize(function(){
if(window.innerWidth > 768) {
$(".menu-primary").removeAttr("style");
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment