jQuery: Stripe Tables
$(function() {
$('table tr:nth-child(odd)').addClass('shade');
$('table tr').hover(function() {
$(this).toggleClass('hover');
});
});
<style>
.shade {
background: silver;
}
.hover {
background: gold;
}
</style>
<table>
<tr>
<td>Item</td>
<td>Other</td>
</tr>
<tr>
<td>Item</td>
<td>Other</td>
</tr>
<tr>
<td>Item</td>
<td>Other</td>
</tr>
<tr>
<td>Item</td>
<td>Other</td>
</tr>
</table>