Skip to content

Commit 9e2f55f

Browse files
committed
Attributes: fix IE6-7 classes
1 parent a79ccf4 commit 9e2f55f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/attributes/classes.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ define( [
77
var rclass = /[\t\r\n\f]/g;
88

99
function getClass( elem ) {
10-
return elem.getAttribute && elem.getAttribute( "class" ) || "";
10+
return jQuery.attr( elem, "class" ) || "";
1111
}
1212

1313
jQuery.fn.extend( {
@@ -40,7 +40,7 @@ jQuery.fn.extend( {
4040
// only assign if different to avoid unneeded rendering.
4141
finalValue = jQuery.trim( cur );
4242
if ( curValue !== finalValue ) {
43-
elem.setAttribute( "class", finalValue );
43+
jQuery.attr( elem, "class", finalValue );
4444
}
4545
}
4646
}
@@ -86,7 +86,7 @@ jQuery.fn.extend( {
8686
// Only assign if different to avoid unneeded rendering.
8787
finalValue = jQuery.trim( cur );
8888
if ( curValue !== finalValue ) {
89-
elem.setAttribute( "class", finalValue );
89+
jQuery.attr( elem, "class", finalValue );
9090
}
9191
}
9292
}

0 commit comments

Comments
 (0)