mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
added an argument to the show and hide methods to specify that no transition should be used, regardless of the default transition type. This is now used on pageshow, so the toolbar does not use an animated transition when the page is initially shown.
This commit is contained in:
parent
ee0573e7d2
commit
bb17f146e4
1 changed files with 5 additions and 5 deletions
|
|
@ -119,7 +119,7 @@ define( [ "jquery", "./jquery.mobile.widget", "./jquery.mobile.core", "./jquery.
|
|||
$.mobile.zoom.disable( true );
|
||||
}
|
||||
if( o.visibleOnPageShow ){
|
||||
self.show();
|
||||
self.show( true );
|
||||
}
|
||||
} )
|
||||
.bind( "webkitAnimationStart animationstart", function(){
|
||||
|
|
@ -158,7 +158,7 @@ define( [ "jquery", "./jquery.mobile.widget", "./jquery.mobile.core", "./jquery.
|
|||
$el.closest( ".ui-page" ).css( "padding-" + ( header ? "top" : "bottom" ), $el.height() );
|
||||
},
|
||||
|
||||
show: function(){
|
||||
show: function( notransition ){
|
||||
var hideClass = "ui-fixed-hidden",
|
||||
$el = this.element,
|
||||
$win = $( window ),
|
||||
|
|
@ -168,7 +168,7 @@ define( [ "jquery", "./jquery.mobile.widget", "./jquery.mobile.core", "./jquery.
|
|||
viewportHeight = Math.min( screen.height, $win.height() ),
|
||||
tbtype = $el.is( ".ui-header" ) ? "header" : "footer";
|
||||
|
||||
if( this.options.transition && this.options.transition !== "none" &&
|
||||
if( !notransition && this.options.transition && this.options.transition !== "none" &&
|
||||
(
|
||||
( tbtype === "header" && !this.options.fullscreen && scroll > elHeight ) ||
|
||||
( tbtype === "footer" && !this.options.fullscreen && scroll + viewportHeight < pHeight - elHeight )
|
||||
|
|
@ -183,7 +183,7 @@ define( [ "jquery", "./jquery.mobile.widget", "./jquery.mobile.core", "./jquery.
|
|||
this._visible = true;
|
||||
},
|
||||
|
||||
hide: function(){
|
||||
hide: function( notransition ){
|
||||
var hideClass = "ui-fixed-hidden",
|
||||
$el = this.element,
|
||||
$win = $( window ),
|
||||
|
|
@ -195,7 +195,7 @@ define( [ "jquery", "./jquery.mobile.widget", "./jquery.mobile.core", "./jquery.
|
|||
// if it's a slide transition, our new transitions need the reverse class as well to slide outward
|
||||
outclass = "out" + ( this.options.transition === "slide" ? " reverse" : "" );
|
||||
|
||||
if( this.options.transition && this.options.transition !== "none" &&
|
||||
if( !notransition && this.options.transition && this.options.transition !== "none" &&
|
||||
(
|
||||
( tbtype === "header" && !this.options.fullscreen && scroll > elHeight ) ||
|
||||
( tbtype === "footer" && !this.options.fullscreen && scroll + viewportHeight < pHeight - elHeight )
|
||||
|
|
|
|||
Loading…
Reference in a new issue