Dave Methvin schrieb:
>  
>>     $("#tableid a").click(function() {
>>          $("#tableid tr").removeClass("highlight");
>>          $(this).parents("tr").addClass("highlight");
>>      }
> 
> It is a little faster to remove classes only on the rows that are
> highlighted:
> 
>           $("#tableid tr.highlight").removeClass("highlight");
> 

Is it really that way? I wondered about that several times what is 
faster - the additional lookup for the class name or the brute force 
removal for all rows...




-- Klaus

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to