$('#container ul:first') should give you the first UL in the container
-Hector


On Mon, Nov 10, 2008 at 4:50 PM, Mark Gibson <[EMAIL PROTECTED]> wrote:

>
> Anyone know how I can find the topmost elements of a certain type, eg.
>
> Say I have several <ul> lists on a page, which in turn contain sub-
> lists, and so on.
> Is there a selector I can use to find all the topmost <ul> elements.
>
> I've been raking my brains over this, and can't see a way with css
> style selectors,
> have i overlooked something?
>
> Ideally I'd like to do:
> $('ul:topmost')
>
> or:
> $('#container ul:topmost')
>
>
> Cheers
> - Mark

Reply via email to