Make sure the resulting className from removeClass is nicely trimmed. Fixes #5988.
This commit is contained in:
parent
f95147f465
commit
e76ba32ceb
2 changed files with 13 additions and 2 deletions
|
@ -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 = "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue