Extra spaces weren't being removed with removeClass - but I haven't found a good...
authorJohn Resig <jeresig@gmail.com>
Mon, 10 Apr 2006 06:09:16 +0000 (06:09 +0000)
committerJohn Resig <jeresig@gmail.com>
Mon, 10 Apr 2006 06:09:16 +0000 (06:09 +0000)
jquery/jquery.js

index 668a592..07fcdff 100644 (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'), '');
                        });