Revision: 41746
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at February 23, 2011 02:46 by pedromagalhaes
Initial Code
$(document).ready(function() { $("table").each(function () { $(this).find("tr:odd").addClass('zebra_odd'); $(this).find("tr:even").addClass('zebra_even'); }); $(".tablelist").each(function () { $(this).find("li:odd").addClass('zebra_odd'); $(this).find("li:even").addClass('zebra_even'); }); });
Initial URL
Initial Description
This little snippet adds css classes for odd and even, in a way you can style each element.
Initial Title
Zebra Table / Zebra Lists
Initial Tags
Initial Language
jQuery