diff --git a/ui/jquery.effects.blind.js b/ui/jquery.effects.blind.js index 6b725078947..78a394140d9 100644 --- a/ui/jquery.effects.blind.js +++ b/ui/jquery.effects.blind.js @@ -17,30 +17,26 @@ $.effects.effect.blind = function( o ) { return this.queue( function() { // Create element - var el = $( this ), + var el = $.effects.$( this ), props = [ 'position', 'top', 'bottom', 'left', 'right' ], mode = $.effects.setMode( el, o.mode || 'hide' ), direction = o.direction || 'vertical', ref = ( direction == 'vertical' ) ? 'height' : 'width', animation = {}, - wrapper, distance; - - $.effects.save( el, props ); - el.show(); - wrapper = $.effects.createWrapper( el ).css({ - overflow: 'hidden' - }); + wrapper = el.save( props ).show().createWrapper({ + overflow: 'hidden' + }), + distance; animation[ ref ] = ( mode == 'show' ? wrapper[ ref ]() : 0 ); - // start at 0 if we are showing + // reset to 0 if we are showing ( mode == 'show' && wrapper.css( ref, 0 ) ); // Animate wrapper.animate( animation, o.duration, o.easing, function() { - ( mode == 'hide' && el.hide() ); - $.effects.restore( el, props ); - $.effects.removeWrapper( el ); + ( mode == 'hide' && el.hide() ); + el.restore( props ).removeWrapper(); $.isFunction( o.complete ) && o.complete.apply( el[ 0 ], arguments ); el.dequeue(); }); diff --git a/ui/jquery.effects.bounce.js b/ui/jquery.effects.bounce.js index 8da0feb7630..de1f8eef6cd 100644 --- a/ui/jquery.effects.bounce.js +++ b/ui/jquery.effects.bounce.js @@ -19,10 +19,10 @@ $.effects.effect.bounce = function(o) { return this.queue(function() { // Create element - var el = $( this ), + var el = $.effects.$( this ), props = [ 'position', 'top', 'bottom', 'left', 'right' ], // defaults: - mode = $.effects.setMode( el, o.mode || 'effect' ), + mode = el.setMode( o.mode || 'effect' ), direction = o.direction || 'up', distance = o.distance || 20, times = o.times || 5, @@ -37,9 +37,7 @@ $.effects.effect.bounce = function(o) { props.push( 'opacity' ); } - $.effects.save( el, props ); - el.show(); - $.effects.createWrapper( el ); // Create Wrapper + el.save( props ).show().createWrapper(); if ( !distance ) { distance = el[ ref == 'top' ? 'outerHeight' : 'outerWidth' ]({ margin:true }) / 3; @@ -76,9 +74,9 @@ $.effects.effect.bounce = function(o) { }; animation[ ref ] = ( motion ? '-=' : '+=' ) + distance; el.animate( animation, speed / 2, o.easing, function(){ - el.hide(); - $.effects.restore( el, props ); - $.effects.removeWrapper( el ); + el.hide() + .restore( props ) + .removeWrapper(); $.isFunction( o.complete ) && o.complete.apply( this, arguments ); }); } else { @@ -89,11 +87,11 @@ $.effects.effect.bounce = function(o) { el .animate( animation1, speed / 2, o.easing ) .animate( animation2, speed / 2, o.easing, function() { - $.effects.restore( el, props ); - $.effects.removeWrapper( el ); + el.restore( props ).removeWrapper(); $.isFunction( o.complete ) && o.complete.apply( this, arguments ); }); } + el.dequeue(); }); diff --git a/ui/jquery.effects.clip.js b/ui/jquery.effects.clip.js index 14b358dfae7..cd6f1df3c69 100644 --- a/ui/jquery.effects.clip.js +++ b/ui/jquery.effects.clip.js @@ -17,26 +17,20 @@ $.effects.effect.clip = function( o ) { return this.queue( function() { // Create element - var el = $( this ), + var el = $.effects.$( this ), props = ['position','top','bottom','left','right','height','width'], - mode = $.effects.setMode( el, o.mode || 'hide' ), + mode = el.setMode( o.mode || 'hide' ), direction = o.direction || 'vertical', ref = { size: (direction == 'vertical') ? 'height' : 'width', position: (direction == 'vertical') ? 'top' : 'left' }, animation = {}, - wrapper, animate, distance; - - // Save & Show - $.effects.save( el, props ); el.show(); - - // Create Wrapper - wrapper = $.effects.createWrapper( el ).css({ - overflow: 'hidden' - }); - animate = ( el[0].tagName == 'IMG' ) ? wrapper : el; - distance = animate[ ref.size ](); + wrapper = el.save( props ).show().createWrapper({ + overflow: 'hidden' + }), + animate = ( el[0].tagName == 'IMG' ) ? wrapper : el, + distance = animate[ ref.size ](); // Shift if ( mode == 'show' ) { @@ -55,8 +49,7 @@ $.effects.effect.clip = function( o ) { easing: o.easing, complete: function() { mode == 'hide' && el.hide(); - $.effects.restore( el, props ); - $.effects.removeWrapper( el ); + el.restore( props ).removeWrapper(); $.isFunction( o.complete ) && o.complete.apply( el[ 0 ], arguments ); el.dequeue(); } diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js index 573cb2554ea..f9572a5d36e 100644 --- a/ui/jquery.effects.core.js +++ b/ui/jquery.effects.core.js @@ -12,9 +12,11 @@ var backCompat = $.uiBackCompat !== false; $.effects = { + $: $.sub(), + + // contains effects 1.9+ API effect functions effect: {} }; - /******************************************************************************/ /****************************** COLOR ANIMATIONS ******************************/ /******************************************************************************/ @@ -323,34 +325,9 @@ $.fn.extend({ $.extend( $.effects, { version: "@VERSION", - // Saves a set of properties in a data storage - save: function( element, set ) { - for( var i=0; i < set.length; i++ ) { - if ( set[ i ] !== null ) { - element.data( "ec.storage." + set[ i ], element[ 0 ].style[ set[ i ] ] ); - } - } - }, - - // Restores a set of previously saved properties from a data storage - restore: function( element, set ) { - for( var i=0; i < set.length; i++ ) { - if ( set[ i ] !== null ) { - element.css( set[ i ], element.data( "ec.storage." + set[ i ] ) ); - } - } - }, - - setMode: function( el, mode ) { - if (mode == 'toggle') { - mode = el.is( ':hidden' ) ? 'show' : 'hide'; - } - return mode; - }, - // Translates a [top,left] array into a baseline value // this should be a little more flexible in the future to handle a string & hash - getBaseline: function( origin, original ) { + getBaseline: function( origin, original ) { var y, x; switch ( origin[ 0 ] ) { case 'top': y = 0; break; @@ -368,18 +345,41 @@ $.extend( $.effects, { x: x, y: y }; + } +}); + +// Effects 1.9 Helper jQuery.sub() +$.effects.$.fn.extend({ + + // Saves a set of properties in a data storage + save: function( set ) { + for( var i=0; i < set.length; i++ ) { + if ( set[ i ] !== null ) { + this.data( "ec.storage." + set[ i ], this[ 0 ].style[ set[ i ] ] ); + } + } + return this; }, - // Wraps the element around a wrapper that copies position properties - createWrapper: function( element ) { + // Restores a set of previously saved properties from a data storage + restore: function( set ) { + for( var i=0; i < set.length; i++ ) { + if ( set[ i ] !== null ) { + this.css( set[ i ], this.data( "ec.storage." + set[ i ] ) ); + } + } + return this; + }, + createWrapper: function( css ) { // if the element is already wrapped, return it - if ( element.parent().is( '.ui-effects-wrapper' )) { - return element.parent(); + if ( this.parent().is( '.ui-effects-wrapper' )) { + return this.parent(); } // wrap the element - var props = { + var element = this, + props = { width: element.outerWidth(true), height: element.outerHeight(true), 'float': element.css( 'float' ) @@ -421,25 +421,51 @@ $.extend( $.effects, { }); } - return wrapper.css( props ).show(); + if ( $.type( css ) == 'object' ) { + props = $.extend( props, css ); + } + + return wrapper.css( props ).show(); + }, + setMode: function( mode ) { + if (mode == 'toggle') { + mode = this.is( ':hidden' ) ? 'show' : 'hide'; + } + return mode; }, - removeWrapper: function( element ) { - if ( element.parent().is( '.ui-effects-wrapper' ) ) - return element.parent().replaceWith( element ); - return element; + removeWrapper: function() { + if ( this.parent().is( '.ui-effects-wrapper' ) ) + return this.parent().replaceWith( this ); + return this; }, - setTransition: function( element, list, factor, value ) { + setTransition: function( list, factor, value ) { + var el = this; value = value || {}; $.each( list, function(i, x){ - unit = element.cssUnit( x ); + unit = el.cssUnit( x ); if ( unit[ 0 ] > 0 ) value[ x ] = unit[ 0 ] * factor + unit[ 1 ]; }); return value; } + }); +// Effects 1.8 API -> 1.9 +if ( BC ) { + + $.each( [ "save", "restore", "createWrapper", "setMode", "removeWrapper", "setTransition" ], function( i, fnName ) { + $.effects[ fnName ] = function() { + var args = [].slice.call( arguments ), + el = args.shift(); + + return $.effects.$.fn[ fnName ].apply( el, args ); + }; + }); + +} + // return an effect options object for the given parameters: function _normalizeArguments( effect, options, speed, callback ) { diff --git a/ui/jquery.effects.drop.js b/ui/jquery.effects.drop.js index 24fb89db0b9..2a1d4d1fbec 100644 --- a/ui/jquery.effects.drop.js +++ b/ui/jquery.effects.drop.js @@ -16,9 +16,9 @@ $.effects.effect.drop = function( o ) { return this.queue( function() { - var el = $( this ), + var el = $.effects.$( this ), props = [ 'position', 'top', 'bottom', 'left', 'right', 'opacity' ], - mode = $.effects.setMode( el, o.mode || 'hide' ), + mode = el.setMode( o.mode || 'hide' ), direction = o.direction || 'left', ref = ( direction == 'up' || direction == 'down' ) ? 'top' : 'left', motion = ( direction == 'up' || direction == 'left' ) ? 'pos' : 'neg', @@ -28,15 +28,12 @@ $.effects.effect.drop = function( o ) { distance; // Adjust - $.effects.save( el, props ); - el.show(); - $.effects.createWrapper( el ); + el.save( props ).show().createWrapper(); distance = o.distance || el[ ref == 'top' ? 'outerHeight': 'outerWidth' ]({ margin: true }) / 2; if ( mode == 'show' ) { - el - .css( 'opacity', 0 ) + el.css( 'opacity', 0 ) .css( ref, motion == 'pos' ? -distance : distance ); } @@ -50,8 +47,7 @@ $.effects.effect.drop = function( o ) { easing: o.easing, complete: function() { mode == 'hide' && el.hide(); - $.effects.restore( el, props ); - $.effects.removeWrapper( el ); + el.restore( props ).removeWrapper(); $.isFunction( o.complete ) && o.complete.apply(this, arguments); el.dequeue(); } diff --git a/ui/jquery.effects.explode.js b/ui/jquery.effects.explode.js index f5217ecb5f4..4414f411923 100644 --- a/ui/jquery.effects.explode.js +++ b/ui/jquery.effects.explode.js @@ -18,8 +18,8 @@ $.effects.effect.explode = function( o ) { var rows = o.pieces ? Math.round(Math.sqrt(o.pieces)) : 3, cells = rows, - el = $( this ), - mode = $.effects.setMode( el, o.mode || 'hide' ), + el = $.effects.$( this ) + mode = el.setMode( o.mode || 'hide' ), show = ( mode == 'show' ), // show and then visibility:hidden the element before calculating offset diff --git a/ui/jquery.effects.fade.js b/ui/jquery.effects.fade.js index 5fa0319c0d4..6cec6e676bb 100644 --- a/ui/jquery.effects.fade.js +++ b/ui/jquery.effects.fade.js @@ -14,8 +14,8 @@ $.effects.effect.fade = function( o ) { return this.queue( function() { - var el = $( this ), - mode = $.effects.setMode( el, o.mode || 'hide' ); + var el = $.effects.$( this ), + mode = el.setMode( o.mode || 'hide' ); el.animate({ opacity: mode diff --git a/ui/jquery.effects.fold.js b/ui/jquery.effects.fold.js index 29da090cb89..3280c94d73a 100644 --- a/ui/jquery.effects.fold.js +++ b/ui/jquery.effects.fold.js @@ -17,27 +17,21 @@ $.effects.effect.fold = function( o ) { return this.queue( function() { // Create element - var el = $( this ), + var el = $.effects.$( this ), props = ['position','top','bottom','left','right'], - mode = $.effects.setMode(el, o.mode || 'hide'), + mode = el.setMode( o.mode || 'hide' ), size = o.size || 15, percent = /([0-9]+)%/.exec(size), horizFirst = !!o.horizFirst, widthFirst = ((mode == 'show') != horizFirst), ref = widthFirst ? ['width', 'height'] : ['height', 'width'], duration = o.duration / 2, - wrapper, distance; - - $.effects.save( el, props ); - el.show(); - - // Create Wrapper - wrapper = $.effects.createWrapper( el ).css({ - overflow: 'hidden' - }); - distance = widthFirst ? - [ wrapper.width(), wrapper.height() ] : - [ wrapper.height(), wrapper.width() ]; + wrapper = el.save( props ).show().createWrapper({ + overflow: 'hidden' + }), + distance = widthFirst ? + [ wrapper.width(), wrapper.height() ] : + [ wrapper.height(), wrapper.width() ]; if ( percent ) { size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ ( mode == 'hide') ? 0 : 1 ]; @@ -60,8 +54,7 @@ $.effects.effect.fold = function( o ) { .animate( animation1, duration, o.easing ) .animate( animation2, duration, o.easing, function() { (mode == 'hide') && el.hide(); - $.effects.restore( el, props ); - $.effects.removeWrapper( el ); + el.restore( props ).removeWrapper(); jQuery.isFunction(o.complete) && o.complete.apply( el[ 0 ], arguments ); el.dequeue(); }); diff --git a/ui/jquery.effects.highlight.js b/ui/jquery.effects.highlight.js index cd4f0705a8d..5a053f3e3c7 100644 --- a/ui/jquery.effects.highlight.js +++ b/ui/jquery.effects.highlight.js @@ -14,20 +14,19 @@ $.effects.effect.highlight = function( o ) { return this.queue( function() { - var elem = $( this ), + var el = $.effects.$( this ), props = [ 'backgroundImage', 'backgroundColor', 'opacity' ], - mode = $.effects.setMode( elem, o.mode || 'show' ), + mode = el.setMode( o.mode || 'show' ), animation = { - backgroundColor: elem.css( 'backgroundColor' ) + backgroundColor: el.css( 'backgroundColor' ) }; if (mode == 'hide') { animation.opacity = 0; } - $.effects.save( elem, props ); - - elem + el + .save( props ) .show() .css({ backgroundImage: 'none', @@ -38,11 +37,11 @@ $.effects.effect.highlight = function( o ) { duration: o.duration, easing: o.easing, complete: function() { - (mode == 'hide' && elem.hide()); - $.effects.restore( elem, props ); + (mode == 'hide' && el.hide()); + el.restore( props ); (mode == 'show' && !$.support.opacity && this.style.removeAttribute( 'filter' )); jQuery.isFunction(o.complete) && o.complete.apply(this, arguments); - elem.dequeue(); + el.dequeue(); } }); }); diff --git a/ui/jquery.effects.pulsate.js b/ui/jquery.effects.pulsate.js index b168b6ef518..7606a8d6900 100644 --- a/ui/jquery.effects.pulsate.js +++ b/ui/jquery.effects.pulsate.js @@ -14,16 +14,16 @@ $.effects.effect.pulsate = function( o ) { return this.queue( function() { - var elem = $( this ), - mode = $.effects.setMode( elem, o.mode || 'show' ), + var el = $.effects.$( this ), + mode = el.setMode( o.mode || 'show' ), times = ( ( o.times || 5 ) * 2 ) - 1, duration = o.duration / 2, - isVisible = elem.is( ':visible' ), + isVisible = el.is( ':visible' ), animateTo = 0, i; if ( !isVisible ) { - elem.css('opacity', 0).show(); + el.css('opacity', 0).show(); animateTo = 1; } @@ -32,17 +32,17 @@ $.effects.effect.pulsate = function( o ) { } for ( i = 0; i < times; i++ ) { - elem.animate({ + el.animate({ opacity: animateTo }, duration, o.easing ); animateTo = ( animateTo + 1 ) % 2; } - elem.animate({ + el.animate({ opacity: animateTo }, duration, o.easing, function() { if (animateTo == 0) { - elem.hide(); + el.hide(); } (o.complete && o.complete.apply(this, arguments)); }).dequeue(); diff --git a/ui/jquery.effects.scale.js b/ui/jquery.effects.scale.js index 8f25ca9a8a7..77b3b09c5d0 100644 --- a/ui/jquery.effects.scale.js +++ b/ui/jquery.effects.scale.js @@ -14,13 +14,13 @@ $.effects.effect.puff = function( o ) { return this.queue( function() { - var elem = $( this ), - mode = $.effects.setMode( elem, o.mode || 'hide' ), + var el = $.effects.$( this ), + mode = el.setMode( o.mode || 'hide' ), percent = parseInt( o.percent, 10 ) || 150, factor = percent / 100, original = { - height: elem.height(), - width: elem.width() + height: el.height(), + width: el.width() }; $.extend(o, { @@ -36,7 +36,7 @@ $.effects.effect.puff = function( o ) { } }); - elem.effect( o ).dequeue(); + el.effect( o ).dequeue(); }); }; @@ -45,9 +45,9 @@ $.effects.effect.scale = function( o ) { return this.queue( function() { // Create element - var el = $( this ), + var el = $.effects.$( this ), options = $.extend( true, {}, o ), - mode = $.effects.setMode( el, o.mode || 'effect' ), + mode = el.setMode( o.mode || 'effect' ), percent = parseInt( o.percent, 10 ) || ( parseInt( o.percent, 10 ) == 0 ? 0 : ( mode == 'hide' ? 0 : 100 ) ), direction = o.direction || 'both', origin = o.origin, @@ -96,7 +96,7 @@ $.effects.effect.size = function( o ) { return this.queue( function() { // Create element - var el = $( this ), + var el = $.effects.$( this ), props = [ 'position', 'top', 'bottom', 'left', 'right', 'width', 'height', 'overflow', 'opacity' ], // Always restore @@ -109,7 +109,7 @@ $.effects.effect.size = function( o ) { hProps = [ 'borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight' ], // Set options - mode = $.effects.setMode( el, o.mode || 'effect' ), + mode = el.setMode( o.mode || 'effect' ), restore = o.restore || false, scale = o.scale || 'both', origin = o.origin, @@ -149,15 +149,15 @@ $.effects.effect.size = function( o ) { // Vertical props scaling if ( factor.from.y != factor.to.y ) { props = props.concat( vProps ); - el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from ); - el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to ); + el.from = el.setTransition( vProps, factor.from.y, el.from ); + el.to = el.setTransition( vProps, factor.to.y, el.to ); }; // Horizontal props scaling if ( factor.from.x != factor.to.x ) { props = props.concat( hProps ); - el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from ); - el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to ); + el.from = el.setTransition( hProps, factor.from.x, el.from ); + el.to = el.setTransition( hProps, factor.to.x, el.to ); }; }; @@ -167,14 +167,12 @@ $.effects.effect.size = function( o ) { // Vertical props scaling if ( factor.from.y != factor.to.y ) { props = props.concat( cProps ); - el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from ); - el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to ); + el.from = el.setTransition( cProps, factor.from.y, el.from ); + el.to = el.setTransition( cProps, factor.to.y, el.to ); }; }; - $.effects.save( el, restore ? props : props1 ); - el.show(); - $.effects.createWrapper( el ); + el.save( restore ? props : props1 ).show().createWrapper(); el.css( 'overflow', 'hidden' ).css( el.from ); // Animate @@ -186,12 +184,12 @@ $.effects.effect.size = function( o ) { props2 = props.concat(vProps).concat(hProps); el.find( "*[width]" ).each( function(){ - var child = $( this ), + var child = $.effects.$( this ), c_original = { height: child.height(), width: child.width() }; - if (restore) $.effects.save(child, props2); + if (restore) el.save(child, props2); child.from = { height: c_original.height * factor.from.y, @@ -204,14 +202,14 @@ $.effects.effect.size = function( o ) { // Vertical props scaling if ( factor.from.y != factor.to.y ) { - child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from ); - child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to ); + child.from = child.setTransition( vProps, factor.from.y, child.from ); + child.to = child.setTransition( vProps, factor.to.y, child.to ); }; // Horizontal props scaling if ( factor.from.x != factor.to.x ) { - child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from ); - child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to ); + child.from = child.setTransition( hProps, factor.from.x, child.from ); + child.to = child.setTransition( hProps, factor.to.x, child.to ); }; // Animate children @@ -219,7 +217,7 @@ $.effects.effect.size = function( o ) { child.animate( child.to, o.duration, o.easing, function() { // Restore children - if (restore) $.effects.restore( child, props2 ); + if (restore) child.restore( props2 ); }); }); }; @@ -236,8 +234,7 @@ $.effects.effect.size = function( o ) { if( mode == 'hide' ) { el.hide(); } - $.effects.restore( el, restore ? props : props1 ); - $.effects.removeWrapper( el ); + el.restore( restore ? props : props1 ).removeWrapper(); $.isFunction( o.complete ) && o.complete.apply( this, arguments ); // Callback el.dequeue(); } diff --git a/ui/jquery.effects.shake.js b/ui/jquery.effects.shake.js index a1ba1577c31..f68807e7a14 100644 --- a/ui/jquery.effects.shake.js +++ b/ui/jquery.effects.shake.js @@ -16,9 +16,9 @@ $.effects.effect.shake = function( o ) { return this.queue( function() { - var el = $( this ), + var el = $.effects.$( this ), props = [ 'position', 'top', 'bottom', 'left', 'right' ], - mode = $.effects.setMode( el, o.mode || 'effect' ), + mode = el.setMode( o.mode || 'effect' ), direction = o.direction || 'left', distance = o.distance || 20, times = o.times || 3, @@ -30,10 +30,7 @@ $.effects.effect.shake = function( o ) { animation2 = {}, i; - // Adjust - $.effects.save( el, props ); - el.show(); - $.effects.createWrapper( el ); // Create Wrapper + el.save( props ).show().createWrapper(); // Animation animation[ ref ] = ( motion == 'pos' ? '-=' : '+=' ) + distance; @@ -52,8 +49,7 @@ $.effects.effect.shake = function( o ) { .animate( animation, speed / 2, o.easing, function() { // Last shake - $.effects.restore( el, props ); - $.effects.removeWrapper( el ); + el.restore( props ).removeWrapper(); $.isFunction( o.complete ) && o.complete.apply( this, arguments ); }) .dequeue(); diff --git a/ui/jquery.effects.slide.js b/ui/jquery.effects.slide.js index 6b029675414..f565722e7ef 100644 --- a/ui/jquery.effects.slide.js +++ b/ui/jquery.effects.slide.js @@ -17,9 +17,9 @@ $.effects.effect.slide = function( o ) { return this.queue( function() { // Create element - var el = $( this ), + var el = $.effects.$( this ), props = ['position','top','bottom','left','right'], - mode = $.effects.setMode( el, o.mode || 'show' ), + mode = el.setMode( o.mode || 'show' ), direction = o.direction || 'left', ref = (direction == 'up' || direction == 'down') ? 'top' : 'left', motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg', @@ -27,9 +27,7 @@ $.effects.effect.slide = function( o ) { animation = {}; // Adjust - $.effects.save( el, props ); - el.show(); - $.effects.createWrapper( el ).css({ + el.save( props ).show().createWrapper({ overflow: 'hidden' }); @@ -55,8 +53,7 @@ $.effects.effect.slide = function( o ) { if ( mode == 'hide' ) { el.hide(); } - $.effects.restore( el, props ); - $.effects.removeWrapper( el ); + el.restore( props ).removeWrapper(); $.isFunction(o.complete) && o.complete.apply( this, arguments ); el.dequeue(); }