X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Ffx%2Ffx.js;h=d83bf0dd431075fcdbe5428ca76ec3ba4e756819;hb=bfa79591b3c849d8df6cd8c7eac757732a855519;hp=30bedbfab8442a368e026d38427ac7ab8ccd2406;hpb=e057aeddccc52372b179c53bd88e15af9650353b;p=jquery.git diff --git a/src/fx/fx.js b/src/fx/fx.js index 30bedbf..d83bf0d 100644 --- a/src/fx/fx.js +++ b/src/fx/fx.js @@ -356,14 +356,14 @@ jQuery.fn.extend({ jQuery.extend({ speed: function(speed, easing, fn) { - var opt = speed.constructor == Object ? speed : { + var opt = speed && speed.constructor == Object ? speed : { complete: fn || !fn && easing || - speed.constructor == Function && speed, + speed && speed.constructor == Function && speed, duration: speed, 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;