Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

reused some code, removed a var

  • Loading branch information...
commit 2a8d2123ffbb7f6c8fa2deab9a28bfad8b82cd64 1 parent 9b1a30f
scottjehl authored
Showing with 7 additions and 5 deletions.
  1. +7 −5 js/jquery.mobile.transition.js
View
12 js/jquery.mobile.transition.js
@@ -28,9 +28,11 @@ var createHandler = function( sequential ){
active = $.mobile.urlHistory.getActive(),
toScroll = active.lastScroll || $.mobile.defaultHomeScroll,
screenHeight = $.mobile.getScreenHeight(),
- viewportClass = "ui-mobile-viewport-transitioning viewport-" + name,
maxTransitionOverride = $.mobile.maxTransitionWidth !== false && $( window ).width() > $.mobile.maxTransitionWidth,
none = !$.support.cssTransitions || maxTransitionOverride || !name || name === "none",
+ toggleViewportClass = function(){
+ $.mobile.pageContainer.toggleClass( "ui-mobile-viewport-transitioning viewport-" + name );
+ },
cleanFrom = function(){
$from
.removeClass( $.mobile.activePageClass + " out in reverse " + name )
@@ -77,14 +79,14 @@ var createHandler = function( sequential ){
$to
.removeClass( "out in reverse " + name )
- .height( "" )
- .parent().removeClass( viewportClass );
+ .height( "" );
+
+ toggleViewportClass();
deferred.resolve( name, reverse, $to, $from, true );
};
- $to
- .parent().addClass( viewportClass );
+ toggleViewportClass();
if ( $from && !none ) {
Please sign in to comment.
Something went wrong with that request. Please try again.