Skip to content
Permalink
Browse files

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

… .show() and .hide().
  • Loading branch information
jeresig committed Nov 30, 2009
1 parent 25c188b commit 3ec9f4990c13f7e44365c9216be5c81b2827385b
Showing with 2 additions and 2 deletions.
  1. +2 −2 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++ ){

0 comments on commit 3ec9f49

Please sign in to comment.
You can’t perform that action at this time.