Jquery Selector Bug :even :odd?
Sorry, i don't speak english. I have found the following feature with jquery selectors ':odd' and ':even' on zebra tables.
My table:
- <table border="0" class="tbl-zebra" cellspacing="0" cellpadding="0" width="100%">
<thead>
<tr>
<td>Table head</td>
</tr>
</thead>
<tbody>
<tr>
<td>Lorem</td>
</tr>
<tr>
<td>Ipsum</td>
</tr>
<tr>
<td>Dolor</td>
</tr>
</tbody>
</table>
Javascript
- $('table.tbl-zebra').each(function() {
$(this).find('>tbody > tr:odd').addClass('odd');
$(this).find('>tbody > tr:even').addClass('even');
});
The first tr in tbody should actually get the odd class ... no tr has the even class???
And the second tr has the odd class ...
Is this a bug in the jquery selectors?