I have a table, and usually I use this selector to apply an odd and even row:
table.find('tbody tr:even').addClass('even');
table.find('tbody tr:odd').removeClass('even');
My table has rows that are inserted in different places, so I delete them from the odd rows.
Now I have some lines hidden with
jQueryTrObject.hide();
I want to apply the same style as before, so that alternating lines, as far as the user is concerned, are marked as odd and even, and I would like it to take into account hidden lines.
How can I write a selector to do this because I have to use each and specifically test?
source
share