diff options
author | gnarf <gnarf@gnarf.net> | 2011-06-21 00:23:52 -0500 |
---|---|---|
committer | gnarf <gnarf@gnarf.net> | 2011-06-21 01:18:01 -0500 |
commit | 1c1a3b1a361d90a73755fbd038b3cdfb0960c29f (patch) | |
tree | f86c98826a6c72421c9bc20b4e75855598bebf34 /ui/jquery.effects.core.js | |
parent | fb210ae1ec16cefb1e4d4dfaf7d55499cac53ab8 (diff) | |
download | jquery-ui-1c1a3b1a361d90a73755fbd038b3cdfb0960c29f.tar.gz jquery-ui-1c1a3b1a361d90a73755fbd038b3cdfb0960c29f.zip |
Effects.*: Updating Effect Method API to avoid duplicating the queue call - Fixes #7318 - Add the queue functions to $.fn.effect()
Diffstat (limited to 'ui/jquery.effects.core.js')
-rw-r--r-- | ui/jquery.effects.core.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js index 00a803360..87fc5a074 100644 --- a/ui/jquery.effects.core.js +++ b/ui/jquery.effects.core.js @@ -536,6 +536,7 @@ $.fn.extend({ effect: function( effect, options, speed, callback ) { var args = _normalizeArguments.apply( this, arguments ), mode = args.mode, + queue = args.queue, effectMethod = $.effects.effect[ args.effect ], // DEPRECATED: remove in 2.0 (#7115) @@ -554,9 +555,13 @@ $.fn.extend({ } } + function run( next ) { + effectMethod.call( this, args, $.isFunction( next ) ? next : $.noop ); + } + // TODO: remove this check in 2.0, effectMethod will always be true if ( effectMethod ) { - return effectMethod.call( this, args ); + return queue === false ? this.each( run ) : this.queue( queue || "fx", run ); } else { // DEPRECATED: remove in 2.0 (#7115) return oldEffectMethod.call(this, { |