Make sure the state is passed in to the toggleClass attribute function.

This commit is contained in:
jeresig 2010-01-07 11:04:21 -05:00
parent 12e8f07e34
commit d36b29fa8e

View file

@ -99,7 +99,7 @@ jQuery.fn.extend({
if ( jQuery.isFunction( value ) ) {
return this.each(function(i) {
var self = jQuery(this);
self.toggleClass( value.call(this, i, self.attr("class")), stateVal );
self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal );
});
}