diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2016-01-07 14:17:00 -0500 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2016-01-07 14:17:00 -0500 |
commit | 41c83f5c016a99b0d3f39d1320799b4c11df22f3 (patch) | |
tree | a14e4709946b04fcca3a9ae7f68fe29c73ad7a15 | |
parent | 56b965655a293a6e1f09bf9c952d6175e6dba42b (diff) | |
download | jquery-41c83f5c016a99b0d3f39d1320799b4c11df22f3.tar.gz jquery-41c83f5c016a99b0d3f39d1320799b4c11df22f3.zip |
Attributes: fix toggleClass(boolean) in ie6/7
-rw-r--r-- | src/attributes/classes.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/attributes/classes.js b/src/attributes/classes.js index b1539193c..a58f5491c 100644 --- a/src/attributes/classes.js +++ b/src/attributes/classes.js @@ -144,13 +144,11 @@ jQuery.fn.extend( { // then remove the whole classname (if there was one, the above saved it). // Otherwise bring back whatever was previously saved (if anything), // falling back to the empty string if nothing was stored. - if ( this.setAttribute ) { - this.setAttribute( "class", - className || value === false ? - "" : - jQuery._data( this, "__className__" ) || "" - ); - } + jQuery.attr( this, "class", + className || value === false ? + "" : + jQuery._data( this, "__className__" ) || "" + ); } } ); }, |