I have a table with rows that include select boxes. I want to apply alternating colors to the rows, but the select boxes aren't changing color. How can I achieve this?
HTML
<table width="100%" cellpadding="0" cellspacing="0" border="0"
class="stdform">
..other codes...
<tr><td>
<table class="fancyTable" id="sortable-table"
cellpadding="0" cellspacing="0" width="100%">
<thead>
<tr>
<td>header one</td>
<td><select><option>--select--</option></select></td>
<td>header three</td>
</tr>
</thead>
<tbody id="job-tbody">
<tr class="prototype">
<td>one</td>
<td><select><option>--select--</option></select></td>
<td>three</td>
</tr>
</tbody>
</table>
</td></tr>
</table>
CSS:
$(document).ready(function() {
$("tr:odd").css("background-color","#eee");
$("tr:even").css("background-color","#ddd");
});
FIDDLE: http://jsfiddle.net/wk7Dy/15/