$("li:not(:has(a))").click( ... );
It's cool!

2008/9/28 BB <[EMAIL PROTECTED]>

>
> $("li:not(:has(a))").click( ... );
>
> would be the shortest!
>
> On 28 Sep., 05:06, Dave Methvin <[EMAIL PROTECTED]> wrote:
> > > Attach a click event to:
> > > <li>List item without link</li>
> >
> > > Do not attach click event to:
> > > <li><a href="">Link 1</a></li>
> >
> > How about this?
> >
> > $("li").not($("li:has(a)")).click( ... )
>

Reply via email to