Fix nested waiting-for-dom for initializePage.

Using dom-ready within dom-ready meant that initializePage went to the end of
the queue. That brought problems when other dom-ready code expected jQM to be
set up, capable of changing pages and so on. But because $.mobile.pageContainer
is also set in initializePage, changePage and others didn't work.
This commit is contained in:
Andri Möll 2011-07-25 15:23:10 -07:00 committed by John Bender
parent cba80d9fff
commit 70bd1ba371

View file

@ -123,9 +123,9 @@
// so if it's 1, use 0 from now on
$.mobile.defaultHomeScroll = ( !$.support.scrollTop || $(window).scrollTop() === 1 ) ? 0 : 1;
// dom-ready inits
if ( $.mobile.autoInitializePage ) {
$( $.mobile.initializePage );
//dom-ready inits
if( $.mobile.autoInitializePage ){
$.mobile.initializePage();
}
// window load event