Example 1 — Official $("li").has("ul")
Mark the list item that contains a nested list (CSS-free).
$("li").has("ul").append(" [has ul]"); How It Works
- Candidates. All
lielements are considered. - Test. Keep only those with a descendant
ul. - Mark. Append runs on the container
li.

