Oops, I meant

$(this).parents().andSelf().nextAll('b:first');

Slightly different :) And yeah, that gets quite slow on a large DOM,
in the 100ms range for thousands of elements.

cheers,
- ricardo

On Jan 14, 8:09 pm, Leeoniya <leeon...@gmail.com> wrote:
> i dont believe it will, next and nextAll only work on siblings. in my
> example, they arent.
>
> On Jan 14, 3:27 pm, Ricardo Tomasi <ricardob...@gmail.com> wrote:
>
> > On Jan 14, 2:11 pm, Leeoniya <leeon...@gmail.com> wrote:
>
> > > nextest() that works outside the bounds of the parent container? for
> > > example:
>
> > > <span>
> > >   <b id="foo">bar</b>
> > > </span>
> > > <span>
> > >   <b>Hello!</b>
> > > </span>
>
> > > $("#foo").nextest("b") would return the second <b> node in the tree
> > > following the current element, but not a sibling. right now i'm
> > > needing to create funky ways to do this, unless i'm missing something.
>
> > $(this).nextAll('b:first') should do it. It seems fast enough on a DOM
> > tree with around 3000 elements.
>
> > - ricardo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to