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:
79c58b8
)
Fixed an issue with animated .toggle() not working.
author
John Resig
<jeresig@gmail.com>
Sat, 13 Jan 2007 22:38:11 +0000
(22:38 +0000)
committer
John Resig
<jeresig@gmail.com>
Sat, 13 Jan 2007 22:38:11 +0000
(22:38 +0000)
src/fx/fx.js
patch
|
blob
|
history
diff --git
a/src/fx/fx.js
b/src/fx/fx.js
index
d83bf0d
..
ece0cea
100644
(file)
--- a/
src/fx/fx.js
+++ b/
src/fx/fx.js
@@
-112,11
+112,12
@@
jQuery.fn.extend({
* @cat Effects
*/
toggle: function( fn, fn2 ){
- return fn ?
+ var args = arguments;
+ return fn && fn.constructor == Function && fn2 && fn2.constructor == Function ?
this._toggle( fn, fn2 ) :
this.each(function(){
jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]
- .apply( jQuery(this), arguments );
+ .apply( jQuery(this), args );
});
},