mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-26 18:50:31 +00:00
Small improvement to keep from querying the DOM more than once for the data-role=pages elements.
This commit is contained in:
parent
2e86ed1425
commit
aa4ff18e22
1 changed files with 3 additions and 3 deletions
|
|
@ -478,9 +478,9 @@
|
|||
|
||||
//dom-ready
|
||||
jQuery(function(){
|
||||
|
||||
var $pages = jQuery("[data-role='page']");
|
||||
//set up active page
|
||||
$startPage = $.activePage = jQuery("[data-role='page']").first();
|
||||
$startPage = $.activePage = $pages.first();
|
||||
|
||||
//set page container
|
||||
$pageContainer = $startPage.parent();
|
||||
|
|
@ -495,7 +495,7 @@
|
|||
}
|
||||
|
||||
//initialize all pages present
|
||||
jQuery("[data-role='page']").page();
|
||||
$pages.page();
|
||||
|
||||
//trigger a new hashchange, hash or not
|
||||
$window.trigger( "hashchange", { manuallyTriggered: true } );
|
||||
|
|
|
|||
Loading…
Reference in a new issue