Actually, I think this bring much more clarity
// recommended way by documentation since it's easier to read
$(document).ready(function(){
// For easier reading, don't mix too much css-expressions. This
will also be much faster to the sizzle-engine to interpretate
// The css-method is also preferred in this case and can also be
written as .css({color : "red"})
$("#tb tr").not(":first").css("color", "red");
})
A more semantic way would also be this
$("#tb tr").not(":first").addClass("hilighted")
and to add the .hilighted class into your css-framework.
/ Johan
On 24 Dec, 04:01, "Rick Faircloth" <[email protected]> wrote:
> $($trs.get(i)).find("td:eq(1)").attr("style", "color:red");
>
> However, this is a pretty stupid way to loop through a jQuery
> object... a better way is to use the each() method:
>
> $trs.each(function() {
> $(this).find("td:eq(1)").attr("style", "color:blue");
>
> });