Skip to content

Instantly share code, notes, and snippets.

@rickrduncan
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rickrduncan/9023722 to your computer and use it in GitHub Desktop.
Save rickrduncan/9023722 to your computer and use it in GitHub Desktop.
jQuery(function( $ ){
$("header #menu-right-menu").addClass("responsive-menu").before('<div id="responsive-menu-icon"></div>');
$("#responsive-menu-icon").click(function(){
$("header #menu-right-menu").slideToggle();
});
$(window).resize(function(){
if(window.innerWidth > 768) {
$("header #menu-right-menu").removeAttr("style");
}
});
});
/* start: responsive nav */
.nav-primary {
display: none;
}
.nav-secondary .mobile,
.genesis-nav-menu .menu-item {
display: block;
text-align: center;
}
.nav-secondary {
float: none;
margin: 0;
width: 100%;
}
/* end: responsive menu */
/* hide our mobile menu items on desktops */
.nav-secondary .mobile {
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment