I used datatables jquery in my application. When I used datatables jquery to set alternate colors for my strings, I ran into a problem. That is, in the table, the 2nd, 3rd, 4th, 5th n 6th row are displayed in one color, after which the colors are displayed alternately. Can anyone help me with this? Thanks in advance.
My code in jquery.datatables.css:
table.dataTable tr.odd { background-color: red; } table.dataTable tr.even { background-color: green; }
I attached a screenshot of the table.

When I checked, each line has either class = "even" or class = "odd", but 2, 3, 4, 5, 6 lines have class = "odd even". I do not know why this is so.
source share