diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-07-25 11:53:14 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-07-25 11:53:14 -0400 |
commit | 19a9de7e668cdb3b76c3b733d0147f1853cb38a5 (patch) | |
tree | a259b421dd77cbec27e55db9b4d1104bf5214a2a /ui/jquery.effects.fade.js | |
parent | daadc343be2f139e82719e2e5ff466aa19ec166f (diff) | |
parent | 51ee3be39829e339c8e4bccb532347944e600ca5 (diff) | |
download | jquery-ui-19a9de7e668cdb3b76c3b733d0147f1853cb38a5.tar.gz jquery-ui-19a9de7e668cdb3b76c3b733d0147f1853cb38a5.zip |
Merge branch 'master' into core-1.6.1
Conflicts:
demos/menubar/default.html
tests/unit/autocomplete/autocomplete.html
tests/visual/effects/effects.all.html
ui/jquery.ui.menu.js
ui/jquery.ui.popup.js
Diffstat (limited to 'ui/jquery.effects.fade.js')
-rw-r--r-- | ui/jquery.effects.fade.js | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/ui/jquery.effects.fade.js b/ui/jquery.effects.fade.js index ff1cba5f8..9b79ad3bc 100644 --- a/ui/jquery.effects.fade.js +++ b/ui/jquery.effects.fade.js @@ -12,29 +12,24 @@ */ (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, done ) { + 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(); } - }); + done(); + } }); }; |