From: Karl Swedberg Date: Tue, 19 Jan 2010 19:52:35 +0000 (+0800) Subject: Made .show() and .hide() use .animate() only if speed argument is truthy or 0. X-Git-Tag: 1.4.1~24^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=21441b1cbc7a205e621b8c94a21eff102380ca03;p=jquery.git Made .show() and .hide() use .animate() only if speed argument is truthy or 0. --- 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 {