Created
June 18, 2012 21:51
-
-
Save mlynch/2950944 to your computer and use it in GitHub Desktop.
Page Show
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(":jqmData(role='page')").live('pageshow', function(e) { | |
// Grab the id of the page that's showing, and select it on the Tab Bar on the page | |
var tabBar, id = $(e.target).attr('id'); | |
tabBar = $.mobile.activePage.find(':jqmData(role="tabbar")'); | |
if(tabBar.length) { | |
tabBar.tabbar('setActive', id); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment