diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2016-01-05 18:19:35 -0500 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2016-01-06 14:05:17 -0500 |
commit | 9e2f55f47ccc055aafa07d131030ff85e2caa39e (patch) | |
tree | 8d3813e21b7db4fc2d0d8e09093acef3cb946a2f /src | |
parent | a79ccf4b185f2789e8df4043004a256cc279d969 (diff) | |
download | jquery-9e2f55f47ccc055aafa07d131030ff85e2caa39e.tar.gz jquery-9e2f55f47ccc055aafa07d131030ff85e2caa39e.zip |
Attributes: fix IE6-7 classes
Diffstat (limited to 'src')
-rw-r--r-- | src/attributes/classes.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/attributes/classes.js b/src/attributes/classes.js index 72aed146d..7ce915202 100644 --- a/src/attributes/classes.js +++ b/src/attributes/classes.js @@ -7,7 +7,7 @@ define( [ var rclass = /[\t\r\n\f]/g; function getClass( elem ) { - return elem.getAttribute && elem.getAttribute( "class" ) || ""; + return jQuery.attr( elem, "class" ) || ""; } jQuery.fn.extend( { @@ -40,7 +40,7 @@ jQuery.fn.extend( { // only assign if different to avoid unneeded rendering. finalValue = jQuery.trim( cur ); if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); + jQuery.attr( elem, "class", finalValue ); } } } @@ -86,7 +86,7 @@ jQuery.fn.extend( { // Only assign if different to avoid unneeded rendering. finalValue = jQuery.trim( cur ); if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); + jQuery.attr( elem, "class", finalValue ); } } } |