Skip to content
Permalink
Browse files

Effects core: Refactored .effect() method; now uses _normalizeArgumen…

…ts and honors jQuery.fx.off. Fixes #4328 (IE6 with fx.off and highlight throws a script error).
  • Loading branch information...
scottgonzalez committed Jun 11, 2009
1 parent e50d9d3 commit 4175ca180af57cb3c5cd938fb828b2d11404ae43
Showing with 11 additions and 2 deletions.
  1. +11 −2 ui/effects.core.js
@@ -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) {

0 comments on commit 4175ca1

Please sign in to comment.
You can’t perform that action at this time.