Skip to content

Commit

Permalink
Made .show() and .hide() use .animate() only if speed argument is tru…
Browse files Browse the repository at this point in the history
…thy or 0.
  • Loading branch information
Karl Swedberg authored and jeresig committed Jan 23, 2010
1 parent 28ce159 commit 21441b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/effects.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 21441b1

Please sign in to comment.