Commit 21441b1c authored by Karl Swedberg's avatar Karl Swedberg Committed by John Resig

Made .show() and .hide() use .animate() only if speed argument is truthy or 0.

parent 28ce1597
...@@ -13,7 +13,7 @@ var elemdisplay = {}, ...@@ -13,7 +13,7 @@ var elemdisplay = {},
jQuery.fn.extend({ jQuery.fn.extend({
show: function( speed, callback ) { show: function( speed, callback ) {
if ( speed != null ) { if ( speed || speed === 0) {
return this.animate( genFx("show", 3), speed, callback); return this.animate( genFx("show", 3), speed, callback);
} else { } else {
...@@ -57,7 +57,7 @@ jQuery.fn.extend({ ...@@ -57,7 +57,7 @@ jQuery.fn.extend({
}, },
hide: function( speed, callback ) { hide: function( speed, callback ) {
if ( speed != null ) { if ( speed || speed === 0 ) {
return this.animate( genFx("hide", 3), speed, callback); return this.animate( genFx("hide", 3), speed, callback);
} else { } else {
......
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