From 21441b1cbc7a205e621b8c94a21eff102380ca03 Mon Sep 17 00:00:00 2001 From: Karl Swedberg Date: Wed, 20 Jan 2010 03:52:35 +0800 Subject: [PATCH] Made .show() and .hide() use .animate() only if speed argument is truthy or 0. --- src/effects.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/effects.js b/src/effects.js index ff2f145b8..7fa734208 100644 --- a/src/effects.js +++ b/src/effects.js @@ -13,7 +13,7 @@ var elemdisplay = {}, jQuery.fn.extend({ show: function( speed, callback ) { - if ( speed != null ) { + if ( speed || speed === 0) { return this.animate( genFx("show", 3), speed, callback); } else { @@ -57,7 +57,7 @@ jQuery.fn.extend({ }, hide: function( speed, callback ) { - if ( speed != null ) { + if ( speed || speed === 0 ) { return this.animate( genFx("hide", 3), speed, callback); } else { -- 2.39.5