[jQuery] Re: Find a specific children in a jquery object

2007-09-13 Thread RobG
On Sep 13, 11:21 pm, Giovanni Battista Lenoci [EMAIL PROTECTED] wrote: Hi, if I want to get the ul childrens of a li element I do something like this: $('#li_id ul') But If I have already the jquery li object how can I do this without getting the id of the element? More in specific, I

[jQuery] Re: Find a specific children in a jquery object

2007-09-13 Thread Giovanni Battista Lenoci
Found! I use the children method passing a selector. There's a better way?

[jQuery] Re: Find a specific children in a jquery object

2007-09-13 Thread emetko
you can use the :has() selector ex. $(this).parent(:has(ul)) will return the parent if it has an ul On Sep 13, 3:21 pm, Giovanni Battista Lenoci [EMAIL PROTECTED] wrote: Hi, if I want to get the ul childrens of a li element I do something like this: $('#li_id ul') But If I have already

[jQuery] Re: Find a specific children in a jquery object

2007-09-13 Thread Andy Matthews
The simplest method would be to use the optional context parameter of the jQuery call. var $list = $('#li_id'); $('ul',$list); -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Giovanni Battista Lenoci Sent: Thursday, September 13, 2007 8:22