How can I set display:none to a ul if only has a single child?
This ul would be hidden, because it only has one li
<ul id="section">
<li id="inThis">In this section:</li>
</ul>
But this ul would not be hidden, because there are multiple lis
<ul id="section">
<li id="inThis">In this section:</li>
<li>Item 1</li>
<li>Item 2</li>
</ul>
1 Answer