X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Ffx%2Ffx.js;h=ece0cea8c2e81b820df21649f4046cc8652e8d7b;hb=8507faea6ed79e46a0461bec9b73879cd700e8ab;hp=0ede5eea9ed402743643709d5610b8c430b308ee;hpb=a3806202ffe1ecc85ba6213f06cc7b6f68c49695;p=jquery.git diff --git a/src/fx/fx.js b/src/fx/fx.js index 0ede5ee..ece0cea 100644 --- a/src/fx/fx.js +++ b/src/fx/fx.js @@ -112,11 +112,12 @@ jQuery.fn.extend({ * @cat Effects */ toggle: function( fn, fn2 ){ - return fn ? + var args = arguments; + return fn && fn.constructor == Function && fn2 && fn2.constructor == Function ? this._toggle( fn, fn2 ) : this.each(function(){ jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ] - .apply( jQuery(this), arguments ); + .apply( jQuery(this), args ); }); }, @@ -363,7 +364,7 @@ jQuery.extend({ easing: fn && easing || easing && easing.constructor != Function && easing }; - opt.duration = (opt.duration.constructor == Number ? + opt.duration = (opt.duration && opt.duration.constructor == Number ? opt.duration : { slow: 600, fast: 200 }[opt.duration]) || 400;