Allow named animation speed to be 0. Fixes #6579.
authorJ. Ryan Stinnett <jryans@gmail.com>
Mon, 17 May 2010 21:48:17 +0000 (16:48 -0500)
committerjeresig <jeresig@gmail.com>
Fri, 24 Sep 2010 14:13:00 +0000 (10:13 -0400)
src/effects.js

index d1d873d..f3163eb 100644 (file)
@@ -256,7 +256,7 @@ jQuery.extend({
                };
 
                opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
-                       jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;
+                       opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
 
                // Queueing
                opt.old = opt.complete;