Rework Navigation Menu Part 2
* Separate scoping and assignment so that a decision does not need to be made as to whether we should intermix spaces and tabs on the left * Restore the previously removed nav-menu class addition to the first unordered list in `#site-navigation`. * Restore the `.navigation-main.toggled-on .nav-menu` selector. * Remove rules for the `.main-small-navigation ul` selector.
This commit is contained in:
parent
4c396f6f9b
commit
ac3cda4543
2 changed files with 6 additions and 9 deletions
|
@ -4,10 +4,9 @@
|
|||
* Handles toggling the navigation menu for small screens.
|
||||
*/
|
||||
( function() {
|
||||
var container = document.getElementById( 'site-navigation' ),
|
||||
button,
|
||||
menu;
|
||||
var container, button, menu;
|
||||
|
||||
container = document.getElementById( 'site-navigation' )
|
||||
if ( ! container )
|
||||
return;
|
||||
|
||||
|
@ -23,6 +22,9 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if ( -1 == menu.className.indexOf( 'nav-menu' ) )
|
||||
menu.className += ' nav-menu';
|
||||
|
||||
button.onclick = function() {
|
||||
if ( -1 != container.className.indexOf( 'toggled' ) )
|
||||
container.className = container.className.replace( ' toggled', '' );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue