Skip to content
Permalink
Browse files

Fixed an issue with animated .toggle() not working.

  • Loading branch information
jeresig committed Jan 13, 2007
1 parent 79c58b8 commit 8507faea6ed79e46a0461bec9b73879cd700e8ab
Showing with 3 additions and 2 deletions.
  1. +3 −2 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 );
});
},

0 comments on commit 8507fae

Please sign in to comment.
You can’t perform that action at this time.