Example 1 — Find the Nearest ul
Official idea: from item A, the first ul upward is ul.level-2.
$("li.item-a").closest("ul").append(" [closest ul]"); How It Works
- Start. Begin at
li.item-a. - Test self. A is not a
ul. - Up. Parent
ul.level-2matches → stop.

