Is it possible to have alternative color for every 5 rows?
From row 1 to 5: Color 1 From row 6 to 10: Color 2 From row 11 to 15: Color 1 From row 16 to 20: Color 2
Thanks,
R
This question has an accepted answers - jump to answer
on "draw" loop through the rows and adjust the color. https://datatables.net/reference/event/draw
You could use this iterator: https://datatables.net/reference/api/rows().every()
Another option would be to use nth-child() in your CSS with a suitable formula.
nth-child()
Allan
I use nth-child() in CSS. Thanks.
It looks like you're new here. If you want to get involved, click one of these buttons!
Answers
on "draw" loop through the rows and adjust the color.
https://datatables.net/reference/event/draw
You could use this iterator:
https://datatables.net/reference/api/rows().every()
Another option would be to use
nth-child()
in your CSS with a suitable formula.Allan
I use nth-child() in CSS. Thanks.