aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.effects.fade.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.effects.fade.js')
-rw-r--r--ui/jquery.effects.fade.js40
1 files changed, 19 insertions, 21 deletions
diff --git a/ui/jquery.effects.fade.js b/ui/jquery.effects.fade.js
index ff1cba5f8..8f2d956dc 100644
--- a/ui/jquery.effects.fade.js
+++ b/ui/jquery.effects.fade.js
@@ -12,29 +12,27 @@
*/
(function( $, undefined ) {
-$.effects.effect.fade = function( o ) {
- return this.queue( function( next ) {
- var el = $( this ),
- mode = $.effects.setMode( el, o.mode || 'toggle' ),
- hide = mode === "hide";
+$.effects.effect.fade = function( o, next ) {
+ var el = $( this ),
+ mode = $.effects.setMode( el, o.mode || "toggle" ),
+ hide = mode === "hide";
- el.show();
- el.animate({
- opacity: hide ? 0 : 1
- }, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( hide ) {
- el.hide();
- }
- if ( o.complete ) {
- o.complete.call( this );
- }
- next();
+ el.show();
+ el.animate({
+ opacity: hide ? 0 : 1
+ }, {
+ queue: false,
+ duration: o.duration,
+ easing: o.easing,
+ complete: function() {
+ if ( hide ) {
+ el.hide();
}
- });
+ if ( o.complete ) {
+ o.complete.call( this );
+ }
+ next();
+ }
});
};