Replies(3)

It doesn't work as you expect because of the vclick delegate that jQuery Mobile registers on the navbar widget:

$navbar.delegate( "a", "vclick", function( event ) {

if ( !$(event.target).hasClass( "ui-disabled" ) ) {

$navbtns.removeClass( $.mobile.activeBtnClass );

$( this ).addClass( $.mobile.activeBtnClass );

}

});

You would have to remove that delegate and then implement your own click event handling to handle the button states. Please note that delegate/undelegate is deprecated and this could be changed from delegate/undelegate to on/off in a future release so this is going to be potentially fragile and something that you'll have to check on each upgrade of jQuery Mobile.