From 9e2f55f47ccc055aafa07d131030ff85e2caa39e Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Tue, 5 Jan 2016 18:19:35 -0500 Subject: [PATCH] Attributes: fix IE6-7 classes --- src/attributes/classes.js | 6 +++--- 1 file 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 ); } } } -- 2.39.5