jQuery - Table Stripes
William McKeehan
William McKeehan
February 3, 2022

jQuery - Table Stripes

jQuery - Table Stripes

When displaying data on a table, alternating colors on each row definitely increases readability. Here’s a snippet to automatically add a CSS class to one row of out two.

$(document).ready(function(){ $("table tr:even").addClass('stripe');
});

Source: [http://www.alovefordesign.com/5-jquery-must-have-code-snippets/