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
Found!
I use the children method passing a selector.
There's a better way?
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
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
4 matches
Mail list logo