Skip to content

Commit df3fbca

Browse files
author
scottjehl
committed
implemented the autoInitializePage global config option, so that auto-initialization may be disabled in favor of manually initializing the page later on. Still needs a unit test.
1 parent fdb77bf commit df3fbca

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

js/jquery.mobile.core.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747

4848
// Error response message - appears when an Ajax page request fails
4949
pageLoadErrorMessage: "Error Loading Page",
50+
51+
//automatically initialize the DOM when it's ready
52+
autoInitializePage: true,
5053

5154
// Support conditions that must be met in order to proceed
5255
// default enhanced qualifications are media query support OR IE 7+

js/jquery.mobile.init.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,10 @@
124124
$.mobile.defaultHomeScroll = ( !$.support.scrollTop || $(window).scrollTop() === 1 ) ? 0 : 1;
125125

126126
//dom-ready inits
127-
$( $.mobile.initializePage );
128-
127+
if( $.mobile.autoInitializePage ){
128+
$( $.mobile.initializePage );
129+
}
130+
129131
//window load event
130132
//hide iOS browser chrome on load
131133
$window.load( $.mobile.silentScroll );

0 commit comments

Comments
 (0)