Is it possible in jQuery to daisy-chain selectors like so?
var sData = $('#myTableRow TD:nth-child(3):nth-child(2)').html();
Is it possible in jQuery to daisy-chain selectors like so?
var sData = $('#myTableRow TD:nth-child(3):nth-child(2)').html();
Yes, but that one in particular makes no sense, since the same <td>
cannot be both the 3rd and the 2nd child of its parent. You can however combine multiple "pseudo-class" qualifiers that do make sense when applied together, like ":text:hidden" for example.
Yes, but you have to add spaces. '#myTable TD:nth-child(3) :nth-child(2)'
means select the 2nd child of the TD which is the third in its parent.
Perhaps you mean:
$('#myTableRow TD:nth-child(3) :nth-child(2)')
Which would be the 2nd child of the 3rd <TD>?