html - How to use jQuery .has() within a nested table -
i'm trying color td cell has nested table class "red". jquery code i'm using color top table, not parent td cell. how need modify following code.
and little reference, i'm using sharepoint nests tables within table within tables. don't have control on unfortunately.
thanks
$("td:has(.red)").addclass("redbg");
i go reverse order: find table class red
, add class redbg
closest td
cell:
$('table.red').closest('td').addclass('redbg');
this rather solution, not answer question.
for jquery closest method have:
for each element in set, first element matches selector testing element , traversing through ancestors in dom tree.
wiki
Comments
Post a Comment