i've been using chains like this all over my webapp:

$(this).parents("li:eq(0)")

it seems that closest is a direct replacement for this and a
functional equiv of

$(this).closest("li").


also, is there anything like

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.

right now i'm forced to do:

var $e = $("#foo");
var i = $("b").index($e);
var finally = $("b:eq(" + (i+1) + ")");

..also consider than in real life $e is not retrieved by id but is
"this" inside a function and often inside of a .each loop.

thanks in advance,
Leon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to