Reputation: 2488
I have found other questions through which I learned how to hide the first row and the (first row's) first cell using;
$('table#truetable tr:first').hide();
and
$('table#truetable td:first').hide();
But what if I want to hide for example the first cell of the second row using this approach?
Upvotes: 0
Views: 784
Reputation: 341
theres a css selector for this:
:nth-child(N)
N is the index of the child +1 in the selection
Upvotes: 0
Reputation: 150253
$('#truetable tr:eq(1) td:first').hide();
jQuery(':eq(index)')
index
Zero-based index of the element to match.
Upvotes: 2