X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fattributes.js;h=3e4c5f21629776a5f4e5bdf33699790c8761483b;hb=726fda08bea7bbd72d73be4563aba855c63966fe;hp=b22acba03ec72902cae1f7f1109d45723c478c6c;hpb=e76ba32cebc26108e15b2e0e03c5152624c1bad9;p=jquery.git diff --git a/src/attributes.js b/src/attributes.js index b22acba..3e4c5f2 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -43,7 +43,7 @@ jQuery.fn.extend({ var className = " " + elem.className + " "; for ( var c = 0, cl = classNames.length; c < cl; c++ ) { if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) { - elem.className += " " + classNames[c]; + elem.className = jQuery.trim( elem.className + " " + classNames[c] ); } } } @@ -330,7 +330,7 @@ jQuery.extend({ } // elem is actually elem.style ... set the style - // Using attr for specific style information is now deprecated. Use style insead. + // Using attr for specific style information is now deprecated. Use style instead. return jQuery.style( elem, name, value ); } });