diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-03-09 10:01:07 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-03-09 10:01:07 -0500 |
commit | 3875cf63e4bef49b0da888bc9c8e60b9512cbf60 (patch) | |
tree | 42387525b2207be91b9da7060d5d0de5c9b08f9e /ui/jquery.effects.fade.js | |
parent | fa7f5d2873b1fef978eab7d9f342c5afa77e061c (diff) | |
parent | 74cff5d57ae35ee05bff1138b1833e896997665d (diff) | |
download | jquery-ui-3875cf63e4bef49b0da888bc9c8e60b9512cbf60.tar.gz jquery-ui-3875cf63e4bef49b0da888bc9c8e60b9512cbf60.zip |
Merge branch 'effects-api' of https://github.com/gnarf37/jquery-ui into gnarf37-effects-api
Diffstat (limited to 'ui/jquery.effects.fade.js')
-rw-r--r-- | ui/jquery.effects.fade.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ui/jquery.effects.fade.js b/ui/jquery.effects.fade.js index 9fa8a79c4..825c84e78 100644 --- a/ui/jquery.effects.fade.js +++ b/ui/jquery.effects.fade.js @@ -12,18 +12,20 @@ */ (function( $, undefined ) { -$.effects.fade = function(o) { - return this.queue(function() { - var elem = $(this), - mode = $.effects.setMode(elem, o.options.mode || 'hide'); +$.effects.fade = function( o ) { + return this.queue( function() { + var el = $( this ), + mode = $.effects.setMode( el, o.mode || 'hide' ); - elem.animate({ opacity: mode }, { + el.animate({ + opacity: mode + }, { queue: false, duration: o.duration, - easing: o.options.easing, + easing: o.easing, complete: function() { - (o.callback && o.callback.apply(this, arguments)); - elem.dequeue(); + $.isFunction( o.complete ) && o.complete.apply( this, arguments ); + el.dequeue(); } }); }); |