From: John Resig Date: Fri, 29 Dec 2006 17:21:48 +0000 (+0000) Subject: Added in some changes to class handling and some docs for jQuery.nth(). X-Git-Tag: 1.1a~68 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5f4f247df0aa567cea33d3c8e1f43be5bea3264c;p=jquery.git Added in some changes to class handling and some docs for jQuery.nth(). --- diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 7f7ef08d1..2ce32e1f6 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -1235,28 +1235,21 @@ jQuery.extend({ }, className: { - add: function(o,c){ - if (jQuery.className.has(o,c)) return; - o.className += ( o.className ? " " : "" ) + c; + add: function( elem, c ){ + if ( jQuery.className.has( elem, c ) ) + return; + elem.className += ( elem.className ? " " : "" ) + c; }, - remove: function(o,c){ - if( !c ) { - o.className = ""; - } else { - var classes = o.className.split(" "); - for(var i=0; i