$("tr:odd").addClass("odd");
然后使用一些CSS:
.odd {
background: #ccc;
}
翻译自: https://css-tricks.com/snippets/jquery/jquery-zebra-stripe-a-table/
$("tr:odd").addClass("odd");
然后使用一些CSS:
.odd {
background: #ccc;
}
翻译自: https://css-tricks.com/snippets/jquery/jquery-zebra-stripe-a-table/