git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5e6c149
)
Normal hide/show toggling was broken, this fixes it (#1219).
author
John Resig
<jeresig@gmail.com>
Thu, 21 Jun 2007 02:52:53 +0000
(
02:52
+0000)
committer
John Resig
<jeresig@gmail.com>
Thu, 21 Jun 2007 02:52:53 +0000
(
02:52
+0000)
src/fx/fx.js
patch
|
blob
|
history
diff --git
a/src/fx/fx.js
b/src/fx/fx.js
index
51e8157
..
f53b2b2
100644
(file)
--- a/
src/fx/fx.js
+++ b/
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 ) :
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" ]();
+ });
},
/**
},
/**