[jQuery] Re: Jquery Selector even and first child (nested tables striping)

2008-03-31 Thread Klaus Hartl
Use the child combinator to select just the children of a certain element. In your case, assuming you have an tbody element: $('table.basic tbody tr:even').addClass('even'); --Klaus On Mar 31, 8:45 pm, rsmolkin [EMAIL PROTECTED] wrote: Hi, I've ran into a little problem.  I'm using the

[jQuery] Re: Jquery Selector even and first child (nested tables striping)

2008-03-31 Thread rsmolkin
Ok, found a solution if anyone else is searching! $('table.basic tr:nth-child(even)').addClass('even'); -Roman On Mar 31, 2:45 pm, rsmolkin [EMAIL PROTECTED] wrote: Hi, I've ran into a little problem. I'm using the code below to do alternate row striping on a table.