Reputation: 3769
I want to select:
<tr class='odd-row'>
and
<tr class='even-row'>
at the same time using jquery, is it possible?
Upvotes: 6
Views: 3268
Reputation: 26753
$('tr.even-row, tr.odd-row')
You can also do
$('.even-row, .odd-row')
If you don't care that it's a tr.
You don't have to pre-mark the rows with an odd/even class. You can also do:
$('tr:odd, tr:even')
And jQuery will figure out which are odd/even on its own.
Upvotes: 10