If only one child (li#inThis), remove self (ul#section)
<p>How can I set <code>display:none</code> to a <code>ul</code> if only has a single child?</p>

<p>This <code>ul</code> would be hidden, because it only has one <code>li</code></p>

<pre><code>&lt;ul id="section"&gt;
  &lt;li id="inThis"&gt;In this section:&lt;/li&gt;
&lt;/ul&gt; 
</code></pre>

<p>But this <code>ul</code> would not be hidden, because there are multiple <code>li</code>s</p>

<pre><code>&lt;ul id="section"&gt;
   &lt;li id="inThis"&gt;In this section:&lt;/li&gt;
   &lt;li&gt;Item 1&lt;/li&gt;
   &lt;li&gt;Item 2&lt;/li&gt;
&lt;/ul&gt;
</code></pre>
