mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Effects core: Refactored .effect() method; now uses _normalizeArguments and honors jQuery.fx.off. Fixes #4328 (IE6 with fx.off and highlight throws a script error).
This commit is contained in:
parent
e50d9d3515
commit
4175ca180a
@ -167,8 +167,17 @@ $.fn.extend({
|
||||
_toggleClass: $.fn.toggleClass,
|
||||
|
||||
// New effect methods
|
||||
effect: function(fx, options, speed, callback) {
|
||||
return $.effects[fx] ? $.effects[fx].call(this, {method: fx, options: options || {}, duration: speed, callback: callback }) : null;
|
||||
effect: function(effect, options, speed, callback) {
|
||||
var args = _normalizeArguments.apply(this, arguments),
|
||||
// TODO: make effects takes actual parameters instead of a hash
|
||||
args2 = {
|
||||
options: args[1],
|
||||
duration: args[2],
|
||||
callback: args[3]
|
||||
},
|
||||
effectMethod = $.effects[effect];
|
||||
|
||||
return effectMethod && !$.fx.off ? effectMethod.call(this, args2) : this;
|
||||
},
|
||||
|
||||
show: function(speed) {
|
||||
|
Loading…
Reference in New Issue
Block a user