X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=jquery%2Fjquery.js;h=97fa48ee508857a6d7d32fa9922903618b76e2f2;hb=6bf8667410f10dc505b81261a568e6a42e1ce809;hp=f54d05ea1b92f68b072b4b6f5758b57e325a4e63;hpb=6ae392a4e57834224b2a686d774ab210da25daa5;p=jquery.git diff --git a/jquery/jquery.js b/jquery/jquery.js index f54d05e..97fa48e 100644 --- a/jquery/jquery.js +++ b/jquery/jquery.js @@ -129,21 +129,21 @@ jQuery.fn = jQuery.prototype = { }, addClass: function(c) { return this.each(function(){ - jQuery.class.add(this,c); + jQuery.className.add(this,c); }); }, removeClass: function(c) { return this.each(function(){ - jQuery.class.remove(this,c); + jQuery.className.remove(this,c); }); }, toggleClass: function(c) { return this.each(function(){ if (jQuery.hasWord(this,c)) - jQuery.class.remove(this,c); + jQuery.className.remove(this,c); else - jQuery.class.add(this,c); + jQuery.className.add(this,c); }); }, remove: function() { @@ -318,10 +318,10 @@ jQuery.fn = jQuery.prototype = { } }; -jQuery.class = { +jQuery.className = { add: function(o,c){ if (jQuery.hasWord(o,c)) return; - o.className += ( o.className.length > 0 ? " " : "" ) + c; + o.className += ( o.className ? " " : "" ) + c; }, remove: function(o,c){ o.className = !c ? "" :