]> source.dussan.org Git - jquery.git/commitdiff
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 4a960a902d2b8dd787e83a6624edf9b72cafb62c..b9cb311ea29306281e26d897c687edc7a60177bf 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'), '');
                        });