I have a table and I am highlighting alternate columns in the table using jquery
$(\"table.Table22 tr td:nth-child(even)\").css(\"background\",\"blue\");
Qualify it with the > descendant selector:
>
$("table.Table22 > tbody > tr > td:nth-child(even)").css("background","blue");
You need the tbody qualifier too, as browsers automatically insert a tbody whether you have it in your markup or not.
tbody
Edit: woops. Thanks Annan.
Edit 2: stressed tbody.