Twenty Twelve: stop nav slide animation when clicking the button multiple times in a row. Props Jayjdk, fixes #21531.
git-svn-id: http://core.svn.wordpress.org/trunk@21519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
175a38d2d4
commit
934101fd65
|
@ -14,7 +14,7 @@ jQuery( document ).ready( function( $ ) {
|
||||||
masthead.find( '.site-navigation h3' ).removeClass( 'assistive-text' ).addClass( 'menu-toggle' );
|
masthead.find( '.site-navigation h3' ).removeClass( 'assistive-text' ).addClass( 'menu-toggle' );
|
||||||
|
|
||||||
$( '.menu-toggle' ).off( 'click' ).click( function() {
|
$( '.menu-toggle' ).off( 'click' ).click( function() {
|
||||||
masthead.find( '.menu' ).slideToggle();
|
masthead.find( '.menu' ).stop().slideToggle();
|
||||||
$( this ).toggleClass( 'toggled-on' );
|
$( this ).toggleClass( 'toggled-on' );
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue