Q:

Jquery Select UL with no LI

I can select all ul elements that contain an li using:
$('li:has(> ul)')

jQuery: determine if a <li> contains a <ul>
Now, how can I select all ul that do not contain an li?
Cheers!

A:

Use this code
$("ul:not(:has(li))")

A:

As ul elments won't contain other elements than li elements, this should do what you want:
$("ul:empty")

