Extra spaces weren't being removed with removeClass - but I haven't found a good workaround yet.

1.7/enhancement_8685
John Resig 2006-04-10 06:09:16 +00:00
parent 904b1c337e
commit cd297dd9eb
1 changed files with 3 additions and 1 deletions

4
jquery/jquery.js vendored
View File

@ -106,7 +106,9 @@ function $(a,c) {
},
removeClass: function(c) {
return this.each(function(){
this.className = c == null ? '' :
if ( c == null )
this.className = '';
else
this.className.replace(
new RegExp('(^|\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), '');
});