]> source.dussan.org Git - jquery.git/commitdiff
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 668a592d5892f1b77bda19b21b9ccf408290a86e..07fcdffecb9a5454254499aead615f0396732043 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'), '');
                        });