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 8507fae
Showing 1 changed file with 3 additions and 2 deletions.
@@ -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.