mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-03 04:14:42 +00:00
Merge pull request #1979 from rwldrn/jquery.mobile.transition.js
jQuery core style guide conformance: jquery.mobile.transition.js
This commit is contained in:
commit
7206049d21
1 changed files with 10 additions and 6 deletions
|
|
@ -7,26 +7,30 @@
|
|||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
( function( $, window, undefined ) {
|
||||
(function( $, window, undefined ) {
|
||||
|
||||
function css3TransitionHandler( name, reverse, $to, $from ) {
|
||||
|
||||
function css3TransitionHandler( name, reverse, $to, $from )
|
||||
{
|
||||
var deferred = new $.Deferred(),
|
||||
reverseClass = reverse ? " reverse" : "",
|
||||
viewportClass = "ui-mobile-viewport-transitioning viewport-" + name,
|
||||
doneFunc = function() {
|
||||
|
||||
$to.add( $from ).removeClass( "out in reverse " + name );
|
||||
|
||||
if ( $from ) {
|
||||
$from.removeClass( $.mobile.activePageClass );
|
||||
}
|
||||
|
||||
$to.parent().removeClass( viewportClass );
|
||||
|
||||
|
||||
deferred.resolve( name, reverse, $to, $from );
|
||||
};
|
||||
|
||||
|
||||
$to.animationComplete( doneFunc );
|
||||
|
||||
|
||||
$to.parent().addClass( viewportClass );
|
||||
|
||||
if ( $from ) {
|
||||
$from.addClass( name + " out" + reverseClass );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue