Commit 8b683b89 authored by John Resig's avatar John Resig

Normal hide/show toggling was broken, this fixes it (#1219).

parent 5e6c1499
...@@ -110,9 +110,13 @@ jQuery.fn.extend({ ...@@ -110,9 +110,13 @@ jQuery.fn.extend({
toggle: function( fn, fn2 ){ toggle: function( fn, fn2 ){
return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ? return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
this._toggle( fn, fn2 ) : this._toggle( fn, fn2 ) :
fn ?
this.animate({ this.animate({
height: "toggle", width: "toggle", opacity: "toggle" height: "toggle", width: "toggle", opacity: "toggle"
}, fn, fn2); }, fn, fn2) :
this.each(function(){
jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
});
}, },
/** /**
......
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