I looked at other similar questions, but their answers did not help me because the selector I'm using is different.
I want to get a tr
in a tbody
of a table
, using the nth-child(n)
selector but in n
I want to put a variable and do something like this:
$("tbody").find("tr:nth-child(' + posicao + ')").addClass("classe");
This way it's not working, and neither have I tried and seen the answers here.