[jQuery] Re: multiple selectors: returns array NOT in order of DOM

2008-06-04 Thread andjules
thanks, that pointed me in the right direction... On Jun 4, 5:12 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote: > I can only think of somehow circumventing to use grouped selectors, > e.g. search by class (which is ugly probably): > > $('.find-me').eq(0).addClass('found-it'); > > or search by univers

[jQuery] Re: multiple selectors: returns array NOT in order of DOM

2008-06-04 Thread Klaus Hartl
I can only think of somehow circumventing to use grouped selectors, e.g. search by class (which is ugly probably): $('.find-me').eq(0).addClass('found-it'); or search by universal selector and filter by type afterwards: $('body *').filter('h2, h4, p, ul').eq(0).addClass('found-it'); Not sure i