Permalink
Browse files

Attributes: fix IE6-7 classes

  • Loading branch information...
timmywil committed Jan 5, 2016
1 parent a79ccf4 commit 9e2f55f47ccc055aafa07d131030ff85e2caa39e
Showing with 3 additions and 3 deletions.
  1. +3 −3 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 );
}
}
}

0 comments on commit 9e2f55f

Please sign in to comment.