title: Add class if HTML tag is empty
body: <p>I need to add a hidden class in my JS if the span is empty, but if it isnt show the content. </p>
  
  <p><strong>HTML</strong></p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div id="uploadControls"&gt;              
    &lt;br&gt;&lt;span id="uploadsError" class="validErrors smarterr"&gt;&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>JavaScript</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>$(document).ready(function () {
      $('#uploadControls').find('span').each(function () {
      if ($(this).is(':empty'))
          $(this).addClass('.hidden');      
  });
  </code></pre>