TR even/odd selector question
New to jQuery so hopefully this isn't too stupid of a question.
I have a html page with nested tables (horrible I know, but none the less what has to be done).
Example:
<table class='parent_table'>
<caption>Title</caption>
<tr>
<td>
<table class='child_table'>
<tr>
<td>Build</td><td>32bit</td><td>64bit</td><td>Date</td>
</tr>
</table>
</td>
</tr>
I am using this jQuery:
$('.parent_table').find('tr:odd').addClass('alt');
However, the alt class is not being added to the parent tr tags...When I just do this:
$('.parent_table').find('tr').addClass('alt');
It successfully adds the alt class to all the parent_table tr tags...Why would that work, but the odd selector does not?
Thanks in advance.