Merge pull request #15 from joshmcrty/master

The .click() event in small-menu.js that toggles the .menu element is re-bound each time the window is resized. This causes multiple .click() events to be bound to the .menu-toggle element, effectively cancelling out the .toggle() function every other time the window is resized.

By using .unbind( 'click' ) before .click(), this is no longer an issue.
This commit is contained in:
Ian Stewart 2012-03-29 10:48:08 -07:00
commit 2150be2d97
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ jQuery( document ).ready( function( $ ) {
$masthead.find( '.site-navigation' ).removeClass( 'main-navigation' ).addClass( 'main-small-navigation' );
$masthead.find( '.site-navigation h1' ).removeClass( 'assistive-text' ).addClass( 'menu-toggle' );
$( '.menu-toggle' ).click( function() {
$( '.menu-toggle' ).unbind( 'click' ).click( function() {
$masthead.find( '.menu' ).toggle();
$( this ).toggleClass( 'toggled-on' );
} );