mirror of
https://github.com/jquery/jquery.git
synced 2026-01-24 13:38:27 -05:00
Normal hide/show toggling was broken, this fixes it (#1219).
This commit is contained in:
10
src/fx/fx.js
10
src/fx/fx.js
@@ -110,9 +110,13 @@ jQuery.fn.extend({
|
||||
toggle: function( fn, fn2 ){
|
||||
return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
|
||||
this._toggle( fn, fn2 ) :
|
||||
this.animate({
|
||||
height: "toggle", width: "toggle", opacity: "toggle"
|
||||
}, fn, fn2);
|
||||
fn ?
|
||||
this.animate({
|
||||
height: "toggle", width: "toggle", opacity: "toggle"
|
||||
}, fn, fn2) :
|
||||
this.each(function(){
|
||||
jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user