Skip to content

Instantly share code, notes, and snippets.

@bradpotter
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 bradpotter/9166204 to your computer and use it in GitHub Desktop.
Save bradpotter/9166204 to your computer and use it in GitHub Desktop.
Javascript
- - - - - - - - - - - - - - - - - -
$( '.nav-header' ).before( '<button class="menu-toggle header-toggle" role="button" aria-pressed="false"></button>' ); // Add toggle to header menu
$( '.nav-primary' ).before( '<button class="menu-toggle primary-toggle" role="button" aria-pressed="false"></button>' ); // Add toggle to primary menu
$( '.nav-secondary' ).before( '<button class="menu-toggle secondary-toggle" role="button" aria-pressed="false"></button>' ); // Add toggle to secondary menu
$( 'nav .sub-menu' ).before( '<button class="sub-menu-toggle" role="button" aria-pressed="false"></button>' ); // Add toggles to sub menus
CSS
- - - - - - - - - - - - - - - - - -
.menu-toggle {
width: 100%!important;
}
.menu-toggle.header-toggle {
background-color: red;
border-bottom: 1px solid #3a3a3a;
color: #999;
}
.menu-toggle.primary-toggle {
background-color: green;
border-bottom: 1px solid #444;
color: #999;
}
.menu-toggle.secondary-toggle {
background-color: blue;
border-bottom: 1px solid #eee;
color: #999;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment