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

This commit is contained in:
John Resig 2006-04-10 06:09:16 +00:00
parent 904b1c337e
commit cd297dd9eb

4
jquery/jquery.js vendored
View file

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