aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.effects.fade.js
diff options
context:
space:
mode:
authorgnarf <gnarf@gnarf.net>2011-03-06 15:24:24 -0600
committergnarf <gnarf@gnarf.net>2011-03-06 15:24:24 -0600
commitbcb8f7ed9aee8ecb0ad5144204f6c7083949b3a7 (patch)
treef73ea5048f9f912c202493b323ae0db7d5f58a77 /ui/jquery.effects.fade.js
parent61cf83408136514282523179e4ce93d3b88638da (diff)
downloadjquery-ui-bcb8f7ed9aee8ecb0ad5144204f6c7083949b3a7.tar.gz
jquery-ui-bcb8f7ed9aee8ecb0ad5144204f6c7083949b3a7.zip
effects.*: More Style Guidance
Diffstat (limited to 'ui/jquery.effects.fade.js')
-rw-r--r--ui/jquery.effects.fade.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/ui/jquery.effects.fade.js b/ui/jquery.effects.fade.js
index 9fa8a79c4..c6cb85cc2 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();
+ jQuery.isFunction( o.complete ) && o.complete.apply( this, arguments );
+ el.dequeue();
}
});
});