Commit cd297dd9 authored by John Resig's avatar John Resig

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

parent 904b1c33
......@@ -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'), '');
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment