Thanks chaps, great answers. Is :gt(n) a jQuery or CSS3 pseudo selector? PS Yehuda - The reason is that I'm not striping a table! Good answer nontheless!
On 3/1/07, Yehuda Katz <[EMAIL PROTECTED]> wrote: > Why do you want to ignore the first two items? A better solution might be to > use <thead> to store header info outside the table and then do $("table > tbody tr:nth-child(odd)") > > -- Yehuda > > > On 2/28/07, Karl Swedberg <[EMAIL PROTECTED]> wrote: > > > > Hi Dan, > > > > > > jQuery doesn't support the ":nth-child(an + b)", only ":nth-child(n)" > > > > > > To select every odd item except the first two items, try this instead: > > > > > > $('#search-results div:nth-child("odd"):gt(0)') > > > > > > > > > > > > > > > > --Karl > > _________________ > > Karl Swedberg > > www.englishrules.com > > www.learningjquery.com > > > > > > > > > > > > > > On Feb 28, 2007, at 7:38 AM, Dan Eastwell wrote: > > > > > > Hello, > > > > > > I'm trying to select every odd item in a list, but not the first two > items. > > > > > > I've tried using the nth-child selector, which is fine at picking out > > the nth-child, but I can't get the 2n+2 child to be selected: > > > > > > stripes("#search-results div:odd"); // is ok > > stripes("#search-results div:nth-child(2)"); // works > > > > > > but > > > > > > stripes("#search-results div:nth-child(2n+2)"); // doesn't. > > > > > > Am I missing something about the CSS3 selector syntax? > > > > > > Thanks, > > > > > > Dan. > > > > > > -- > > Daniel Eastwell > > > > > > Portfolio and articles: > > http://www.thoughtballoon.co.uk > > > > > > Blog: > > http://www.thoughtballoon.co.uk/blog > > > > > > _______________________________________________ > > jQuery mailing list > > discuss@jquery.com > > http://jquery.com/discuss/ > > > > _______________________________________________ > > jQuery mailing list > > discuss@jquery.com > > http://jquery.com/discuss/ > > > > > > > > -- > Yehuda Katz > Web Developer | Wycats Designs > (ph) 718.877.1325 > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > -- Daniel Eastwell Portfolio and articles: http://www.thoughtballoon.co.uk Blog: http://www.thoughtballoon.co.uk/blog _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/