aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/attributes/classes.js6
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 );
}
}
}