Alternating Table Rows via jQuery

/ Published in: JavaScript
Save to your folder(s)

Uses jQuery to add a class to odd table rows, for purposes of alternating colors, etc.

Copy this code and paste it in your HTML
  1. $("tr:nth-child(odd)").addClass("odd");

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.