]> source.dussan.org Git - jquery.git/commitdiff
Made .show() and .hide() use .animate() only if speed argument is truthy or 0.
authorKarl Swedberg <karl@englishrules.com>
Tue, 19 Jan 2010 19:52:35 +0000 (03:52 +0800)
committerJohn Resig <jeresig@gmail.com>
Sat, 23 Jan 2010 17:25:22 +0000 (01:25 +0800)
src/effects.js

index ff2f145b89ebcf6f4cab8ef72f0aca8baa891c57..7fa7342088e137abf1da1ac7531fb677f7ad2edc 100644 (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 {