How do I add odd/even class only for table rows which haven´t had odd/even class yet?

How do I add odd/even class only for table rows which haven´t had odd/even class yet?

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?

  
  1. $("table tbody tr td")
  2. .parent("tr:nth-child(odd)")
  3. .addClass("odd")
  4. .end()
  5. .parent("tr:nth-child(even)")
  6. .addClass("even");