mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-17 06:20:26 +00:00
whitespace in mobile core
This commit is contained in:
parent
9caaa9cfde
commit
0a7bdfd632
1 changed files with 9 additions and 7 deletions
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
//automatically handle clicks and form submissions through Ajax, when same-domain
|
||||
ajaxEnabled: true,
|
||||
|
||||
|
||||
//automatically load and show pages based on location.hash
|
||||
hashListeningEnabled: true,
|
||||
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
gradeA: function(){
|
||||
return $.support.mediaquery;
|
||||
},
|
||||
|
||||
|
||||
//automatically initialize first pages or not.
|
||||
autoInitialize: true,
|
||||
|
||||
|
|
@ -144,16 +144,16 @@
|
|||
} else {
|
||||
if( $.mobile.loadingMessage ){
|
||||
var activeBtn =$( "." + $.mobile.activeBtnClass ).first();
|
||||
|
||||
|
||||
$loader
|
||||
.appendTo( $.mobile.pageContainer )
|
||||
//position at y center (if scrollTop supported), above the activeBtn (if defined), or just 100px from top
|
||||
.css( {
|
||||
top: $.support.scrollTop && $(window).scrollTop() + $(window).height() / 2 ||
|
||||
top: $.support.scrollTop && $(window).scrollTop() + $(window).height() / 2 ||
|
||||
activeBtn.length && activeBtn.offset().top || 100
|
||||
} );
|
||||
}
|
||||
|
||||
|
||||
$html.addClass( "ui-loading" );
|
||||
}
|
||||
},
|
||||
|
|
@ -163,15 +163,17 @@
|
|||
ypos = ypos || 0;
|
||||
// prevent scrollstart and scrollstop events
|
||||
$.event.special.scrollstart.enabled = false;
|
||||
|
||||
setTimeout(function() {
|
||||
window.scrollTo( 0, ypos );
|
||||
$(document).trigger( "silentscroll", { x: 0, y: ypos });
|
||||
},20);
|
||||
|
||||
setTimeout(function() {
|
||||
$.event.special.scrollstart.enabled = true;
|
||||
}, 150 );
|
||||
},
|
||||
|
||||
|
||||
// find and enhance the pages in the dom and transition to the first page.
|
||||
initializePage: function(){
|
||||
//find present pages
|
||||
|
|
@ -191,7 +193,7 @@
|
|||
//cue page loading message
|
||||
$.mobile.pageLoading();
|
||||
|
||||
// if hashchange listening is disabled or there's no hash deeplink, change to the first page in the DOM
|
||||
// if hashchange listening is disabled or there's no hash deeplink, change to the first page in the DOM
|
||||
if( !$.mobile.hashListeningEnabled || !$.mobile.path.stripHash( location.hash ) ){
|
||||
$.mobile.changePage( $.mobile.firstPage, false, true, false, true );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue