Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request #4579 from jasondscott/1181_ActiveNavBtn
Browse files Browse the repository at this point in the history
Fixes: #1181 - navbar link stays active when using changePage()
  • Loading branch information
jaspermdegroot committed Feb 4, 2013
2 parents 2cbe5f9 + f8abd04 commit 64143ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/widgets/navbar.js
Expand Up @@ -41,6 +41,10 @@ $.widget( "mobile.navbar", $.mobile.widget, {
if ( !$(event.target).hasClass( "ui-disabled" ) ) {
$navbtns.removeClass( $.mobile.activeBtnClass );
$( this ).addClass( $.mobile.activeBtnClass );
var activeNavbtn = $( this );
$( document ).one( "pagechange", function( event ) {
activeNavbtn.removeClass( $.mobile.activeBtnClass );
});
}
});

Expand Down

0 comments on commit 64143ae

Please sign in to comment.