diff options
author | jeresig <jeresig@gmail.com> | 2009-11-30 14:28:09 -0500 |
---|---|---|
committer | jeresig <jeresig@gmail.com> | 2009-11-30 14:28:09 -0500 |
commit | 3ec9f4990c13f7e44365c9216be5c81b2827385b (patch) | |
tree | 005dbc8f495d6993d5ee479be2b70bef4b0be14e /src | |
parent | 25c188b6d2b8a8758c2bd97ca45e0fb14b869431 (diff) | |
download | jquery-3ec9f4990c13f7e44365c9216be5c81b2827385b.tar.gz jquery-3ec9f4990c13f7e44365c9216be5c81b2827385b.zip |
Made .show(null/undefined) and .hide(null/undefined) work the same as .show() and .hide().
Diffstat (limited to 'src')
-rw-r--r-- | src/fx.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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++ ){ |