Skip to content

Commit 41c83f5

Browse files
committed
Attributes: fix toggleClass(boolean) in ie6/7
1 parent 56b9656 commit 41c83f5

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/attributes/classes.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,11 @@ jQuery.fn.extend( {
144144
// then remove the whole classname (if there was one, the above saved it).
145145
// Otherwise bring back whatever was previously saved (if anything),
146146
// falling back to the empty string if nothing was stored.
147-
if ( this.setAttribute ) {
148-
this.setAttribute( "class",
149-
className || value === false ?
150-
"" :
151-
jQuery._data( this, "__className__" ) || ""
152-
);
153-
}
147+
jQuery.attr( this, "class",
148+
className || value === false ?
149+
"" :
150+
jQuery._data( this, "__className__" ) || ""
151+
);
154152
}
155153
} );
156154
},

0 commit comments

Comments
 (0)