Skip to content

Instantly share code, notes, and snippets.

@mlynch
Created June 18, 2012 18:42
Show Gist options
  • Save mlynch/2949944 to your computer and use it in GitHub Desktop.
Save mlynch/2949944 to your computer and use it in GitHub Desktop.
Page Create
(function($) {
$.widget('mobile.tabbar', $.mobile.navbar, {
_create: function() {
$.mobile.navbar.prototype._create.call(this);
// ...
}
});
$(document).bind('pagecreate create', function(e) {
// Create a tab bar for every element that has data-role="tabbar" on this page.
return $(e.target).find(":jqmData(role='tabbar')").tabbar();
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment