]> source.dussan.org Git - jquery.git/commitdiff
Made .show(null/undefined) and .hide(null/undefined) work the same as .show() and...
authorjeresig <jeresig@gmail.com>
Mon, 30 Nov 2009 19:28:09 +0000 (14:28 -0500)
committerjeresig <jeresig@gmail.com>
Mon, 30 Nov 2009 19:28:09 +0000 (14:28 -0500)
src/fx.js

index d8340b139df928ebe52856d30be9390a72587602..d3a7ad4046a1560f70528d27777442064959473a 100644 (file)
--- a/src/fx.js
+++ b/src/fx.js
@@ -19,7 +19,7 @@ function genFx( type, num ){
 
 jQuery.fn.extend({
        show: function( speed, callback ) {
-               if ( typeof speed !== "undefined" ) {
+               if ( speed != null ) {
                        return this.animate( genFx("show", 3), speed, callback);
                } else {
                        for ( var i = 0, l = this.length; i < l; i++ ){
@@ -59,7 +59,7 @@ jQuery.fn.extend({
        },
 
        hide: function( speed, callback ) {
-               if ( typeof speed !== "undefined" ) {
+               if ( speed != null ) {
                        return this.animate( genFx("hide", 3), speed, callback);
                } else {
                        for ( var i = 0, l = this.length; i < l; i++ ){