diff --git a/js/index.php b/js/index.php index 705fa741..5e6752d4 100644 --- a/js/index.php +++ b/js/index.php @@ -18,6 +18,12 @@ $files = array( 'jquery.mobile.navigation.js', 'jquery.mobile.navigation.pushstate.js', 'jquery.mobile.transition.js', + 'jquery.mobile.transition.js', + 'jquery.mobile.transition.pop.js', + 'jquery.mobile.transition.slide.js', + 'jquery.mobile.transition.slidedown.js', + 'jquery.mobile.transition.slideup.js', + 'jquery.mobile.transition.flip.js', 'jquery.mobile.degradeInputs.js', 'jquery.mobile.dialog.js', 'jquery.mobile.page.sections.js', diff --git a/js/jquery.mobile.transition.flip.js b/js/jquery.mobile.transition.flip.js new file mode 100644 index 00000000..9df38cdd --- /dev/null +++ b/js/jquery.mobile.transition.flip.js @@ -0,0 +1,9 @@ +/* +* fallback transition for flip in non-3D supporting browsers (which tend to handle complex transitions poorly in general +*/ + +(function( $, window, undefined ) { + +$.mobile.transitionFallbacks.flip = "fade"; + +})( jQuery, this ); diff --git a/js/jquery.mobile.transition.js b/js/jquery.mobile.transition.js index 0325bb21..07f20810 100644 --- a/js/jquery.mobile.transition.js +++ b/js/jquery.mobile.transition.js @@ -6,6 +6,11 @@ function outInTransitionHandler( name, reverse, $to, $from ) { + // first, override name if there's no 3D transform support and a fallback is defined + if( name && !$.support.cssTransform3d ){ + name = $.mobile.transitionFallbacks[ name ] || "none"; + } + var deferred = new $.Deferred(), reverseClass = reverse ? " reverse" : "", active = $.mobile.urlHistory.getActive(), @@ -97,4 +102,6 @@ $.mobile.transitionHandlers = { "default": $.mobile.defaultTransitionHandler }; +$.mobile.transitionFallbacks = {}; + })( jQuery, this ); diff --git a/js/jquery.mobile.transition.pop.js b/js/jquery.mobile.transition.pop.js new file mode 100644 index 00000000..3f621f29 --- /dev/null +++ b/js/jquery.mobile.transition.pop.js @@ -0,0 +1,9 @@ +/* +* fallback transition for pop in non-3D supporting browsers (which tend to handle complex transitions poorly in general +*/ + +(function( $, window, undefined ) { + +$.mobile.transitionFallbacks.pop = "fade"; + +})( jQuery, this ); diff --git a/js/jquery.mobile.transition.slide.js b/js/jquery.mobile.transition.slide.js new file mode 100644 index 00000000..d7a8cf80 --- /dev/null +++ b/js/jquery.mobile.transition.slide.js @@ -0,0 +1,9 @@ +/* +* fallback transition for slide in non-3D supporting browsers (which tend to handle complex transitions poorly in general +*/ + +(function( $, window, undefined ) { + +$.mobile.transitionFallbacks.slide = "fade"; + +})( jQuery, this ); diff --git a/js/jquery.mobile.transition.slidedown.js b/js/jquery.mobile.transition.slidedown.js new file mode 100644 index 00000000..08d60222 --- /dev/null +++ b/js/jquery.mobile.transition.slidedown.js @@ -0,0 +1,9 @@ +/* +* fallback transition for slidedown in non-3D supporting browsers (which tend to handle complex transitions poorly in general +*/ + +(function( $, window, undefined ) { + +$.mobile.transitionFallbacks.slidedown = "fade"; + +})( jQuery, this ); diff --git a/js/jquery.mobile.transition.slideup.js b/js/jquery.mobile.transition.slideup.js new file mode 100644 index 00000000..2b37ff40 --- /dev/null +++ b/js/jquery.mobile.transition.slideup.js @@ -0,0 +1,9 @@ +/* +* fallback transition for slideup in non-3D supporting browsers (which tend to handle complex transitions poorly in general +*/ + +(function( $, window, undefined ) { + +$.mobile.transitionFallbacks.slideup = "fade"; + +})( jQuery, this );