From 84f4d9dc3c36b908a73b1e82423bbd5fe9e68fe1 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Sun, 19 Jun 2011 14:20:19 -0400 Subject: [PATCH] switched the order so that scroll check happens earlier. --- js/jquery.mobile.init.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/js/jquery.mobile.init.js b/js/jquery.mobile.init.js index e15a538cc60..9744b99703f 100644 --- a/js/jquery.mobile.init.js +++ b/js/jquery.mobile.init.js @@ -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 @@ -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 );