Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function applyAltRows(tableSel, evenColor, oddColor) {
- $(tableSel + " tr").each(function (index) {
- if (index === 0) {
- return;
- }
- if ((index % 2 === 0)) {
- if (evenColor !== null) $(this).css("background-color", evenColor);
- } else {
- if (oddColor !== null) $(this).css("background-color", oddColor);
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment