mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-24 14:13:43 +00:00
implemented fallback transition definitions for non-3D-supporting browsers, for all transitions except "fade". By default, these are all set to fall back to "fade", and they'll fall back to "none" if 3D is unsupported and no fallback is defined. They can be overridden at mobileinit, like any other jQM default.
This commit is contained in:
parent
a237c5f2e1
commit
a3e776297e
7 changed files with 58 additions and 0 deletions
|
|
@ -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',
|
||||
|
|
|
|||
9
js/jquery.mobile.transition.flip.js
Normal file
9
js/jquery.mobile.transition.flip.js
Normal file
|
|
@ -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 );
|
||||
|
|
@ -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 );
|
||||
|
|
|
|||
9
js/jquery.mobile.transition.pop.js
Normal file
9
js/jquery.mobile.transition.pop.js
Normal file
|
|
@ -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 );
|
||||
9
js/jquery.mobile.transition.slide.js
Normal file
9
js/jquery.mobile.transition.slide.js
Normal file
|
|
@ -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 );
|
||||
9
js/jquery.mobile.transition.slidedown.js
Normal file
9
js/jquery.mobile.transition.slidedown.js
Normal file
|
|
@ -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 );
|
||||
9
js/jquery.mobile.transition.slideup.js
Normal file
9
js/jquery.mobile.transition.slideup.js
Normal file
|
|
@ -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 );
|
||||
Loading…
Reference in a new issue