mirror of
https://github.com/WordPress/WordPress.git
synced 2024-10-04 02:28:02 +02:00
1dabc15e34
git-svn-id: http://core.svn.wordpress.org/trunk@21557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
16 lines
381 B
JavaScript
16 lines
381 B
JavaScript
/**
|
|
* navigation.js
|
|
*
|
|
* Handles toggling the navigation menu for small screens.
|
|
*/
|
|
|
|
jQuery( document ).ready( function( $ ) {
|
|
if ( ! $( '#masthead .menu' ).children().length ) {
|
|
$( '#masthead .menu-toggle' ).hide();
|
|
}
|
|
|
|
$( '.menu-toggle' ).off( 'click' ).click( function() {
|
|
$( '#masthead .menu' ).stop().slideToggle();
|
|
$( this ).toggleClass( 'toggled-on' );
|
|
} );
|
|
} ); |