Normal hide/show toggling was broken, this fixes it (#1219).
This commit is contained in:
parent
5e6c14993a
commit
8b683b891f
1 changed files with 7 additions and 3 deletions
10
src/fx/fx.js
10
src/fx/fx.js
|
@ -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 ) :
|
||||||
this.animate({
|
fn ?
|
||||||
height: "toggle", width: "toggle", opacity: "toggle"
|
this.animate({
|
||||||
}, fn, fn2);
|
height: "toggle", width: "toggle", opacity: "toggle"
|
||||||
|
}, fn, fn2) :
|
||||||
|
this.each(function(){
|
||||||
|
jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue