I have a tr element
$('tr')
I need to select several first children (td in this case).
How can I do this?
:nth-child() can select even or odd elements. :eq() can select only one.
So the only way is
$('tr td:eq(0), tr td:eq(1), ... tr td:eq(n-1)')
Is there any shortcut?
Use the less than selector
Also, note the comment in the docs