I have this code:
$("#widgetstable tr td:nth-child("+column+")").hide();
But it selects any td’s that happen to be nested inside the selected td’s. (And there are a couple.)
I tried $("#widgetstable > tr > td:nth-child("+column+")").hide(); but it didn’t select ANYTHING.
A
tbodyis inserted silently when your browser parses your HTML, and the>selector means the direct child of the parent. For the following HTML this selector would work:Here is a demo