How do I add odd/even class only for table rows which haven´t had odd/even class yet? (for some tables I use php cycle function)
How do I have to change this code?
- $("table tbody tr td")
- .parent("tr:nth-child(odd)")
- .addClass("odd")
- .end()
- .parent("tr:nth-child(even)")
- .addClass("even");