Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Fix nested waiting-for-dom for initializePage.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
moll authored and johnbender committed Aug 11, 2011
1 parent cba80d9 commit 70bd1ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/jquery.mobile.init.js
Expand Up @@ -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
Expand Down

0 comments on commit 70bd1ba

Please sign in to comment.