aboutsummaryrefslogtreecommitdiffstats
path: root/src/attributes.js
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2010-02-13 02:18:38 -0500
committerjeresig <jeresig@gmail.com>2010-02-13 02:18:38 -0500
commit83a044f1b5a733dc7ea76dbc9b7dd3a3dc4b7f25 (patch)
tree388f0abf17080b0d112ce4a896cf5406deac6049 /src/attributes.js
parent94d925cd4615d88532737f3cd106ecd1f8c34bc3 (diff)
downloadjquery-83a044f1b5a733dc7ea76dbc9b7dd3a3dc4b7f25.tar.gz
jquery-83a044f1b5a733dc7ea76dbc9b7dd3a3dc4b7f25.zip
Make sure that no extra whitespace is leftover after an addClass. Fixes #6050.
Diffstat (limited to 'src/attributes.js')
-rw-r--r--src/attributes.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/attributes.js b/src/attributes.js
index d217793cc..3e4c5f216 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] );
}
}
}