I have an HTML table with some <tr> and <td>, and I need to set some attributes to certain <td> elements. So, the problem is:
If I write the selector this way:
$("table tr:not(table tr:first)").css("background","#ccc");
it works fine, but if I try to use a specific table, nothing happens:
$("#tableTit tr:not(#tableTit tr:first)").css("background","#ccc");
What am I missing?
You don’t need to specify the ID a second time. Just do this:
Or as @bažmegakapa suggests in the comments: