> I have elem2 object, and want to access the first seen elem1 (whose
> name is 3),

$("elem2").parents("elem1:first");

> or last parent who is elem1 (whose name is 1 in my example).

$("elem2").parents("elem1:last");

Let me know if that helps.

--John

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to