I have an awkward problem, due to inheriting a shedload of really, really badly formatted HTML.
Basically I have some table rows like this:
<tr class="odd">...</tr>
<tr class="odd">...</tr>
<tr class="odd">...</tr>
<tr class="even">...</tr>
<tr class="even">...</tr>
<tr class="even">...</tr>
<tr class="odd">...</tr>
<tr class="odd">...</tr>
<tr class="odd">...</tr>
And what I need is a jQuery selector that will give me the first element of each block of classes. Is that clear enough? I'm not sure how else to explain it.
So in the example case I would want rows 1, 4, and 7.
Ive done this so far by selecting every nth child, but Ive now realised this wont work as there wont always be the same number of rows in each block of classes.
Any help you guys can give it appreciated, as always :)
Cheers!