Commit 3ec9f499 authored by jeresig's avatar jeresig

Made .show(null/undefined) and .hide(null/undefined) work the same as .show() and .hide().

parent 25c188b6
...@@ -19,7 +19,7 @@ function genFx( type, num ){ ...@@ -19,7 +19,7 @@ function genFx( type, num ){
jQuery.fn.extend({ jQuery.fn.extend({
show: function( speed, callback ) { show: function( speed, callback ) {
if ( typeof speed !== "undefined" ) { if ( speed != null ) {
return this.animate( genFx("show", 3), speed, callback); return this.animate( genFx("show", 3), speed, callback);
} else { } else {
for ( var i = 0, l = this.length; i < l; i++ ){ for ( var i = 0, l = this.length; i < l; i++ ){
...@@ -59,7 +59,7 @@ jQuery.fn.extend({ ...@@ -59,7 +59,7 @@ jQuery.fn.extend({
}, },
hide: function( speed, callback ) { hide: function( speed, callback ) {
if ( typeof speed !== "undefined" ) { if ( speed != null ) {
return this.animate( genFx("hide", 3), speed, callback); return this.animate( genFx("hide", 3), speed, callback);
} else { } else {
for ( var i = 0, l = this.length; i < l; i++ ){ for ( var i = 0, l = this.length; i < l; i++ ){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment