Make sure the resulting className from removeClass is nicely trimmed. Fixes #5988.

This commit is contained in:
jeresig 2010-02-01 21:33:58 -05:00
parent f95147f465
commit e76ba32ceb
2 changed files with 13 additions and 2 deletions

View file

@ -74,7 +74,7 @@ jQuery.fn.extend({
for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
className = className.replace(" " + classNames[c] + " ", " ");
}
elem.className = className.substring(1, className.length - 1);
elem.className = jQuery.trim( className );
} else {
elem.className = "";