title: how to test if a div contains another div
body: <pre><code>&lt;div class="contact-area"&gt;
    &lt;div class="media-contact"&gt;name, email etc goes here...&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I need to check if div contact-area has div media-contact, if not then hide the contact-area as it has a colored background, and i dont want to have an empty colored background.</p>
  
  <p>This is not working.please help.</p>
  
  <pre><code>$('.contact-area').each(function() {
      var ContactAreaEmpty= $('.contact-area:not(:has(.media-contact)');
      ContactAreaEmpty.hide();
  </code></pre>