Aieeeeee!! removeClass bug fixed. I'm so dumb.
authorJohn Resig <jeresig@gmail.com>
Tue, 2 May 2006 19:03:07 +0000 (19:03 +0000)
committerJohn Resig <jeresig@gmail.com>
Tue, 2 May 2006 19:03:07 +0000 (19:03 +0000)
jquery/jquery.js

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