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

Commit

Permalink
switched the order so that scroll check happens earlier.
Browse files Browse the repository at this point in the history
  • Loading branch information
scottjehl committed Jun 19, 2011
1 parent a09c53e commit 84f4d9d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions js/jquery.mobile.init.js
Expand Up @@ -100,12 +100,6 @@
}
}
});

//dom-ready inits
$( $.mobile.initializePage );

//window load event
//hide iOS browser chrome on load

//check which scrollTop value should be used by scrolling to 1 immediately
//then check what the scroll top is. Android will report 0... others 1
Expand All @@ -117,6 +111,10 @@
//so if it's 1, use 0 from now on
$.mobile.defaultHomeScroll = ( !$.support.scrollTop || $(window).scrollTop() === 1 ) ? 0 : 1;

//call silentScroll on load to hide addr bar
//dom-ready inits
$( $.mobile.initializePage );

//window load event
//hide iOS browser chrome on load
$window.load( $.mobile.silentScroll );
})( jQuery, this );

0 comments on commit 84f4d9d

Please sign in to comment.