Made .show() and .hide() use .animate() only if speed argument is truthy or 0.

This commit is contained in:
Karl Swedberg 2010-01-20 03:52:35 +08:00 committed by John Resig
parent 28ce15979f
commit 21441b1cbc

4
src/effects.js vendored
View file

@ -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 {