title: How to check if div element is empty
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/6813227/checking-if-an-html-element-is-empty-with-jquery">Checking if an html element is empty with jQuery</a>  </p>
  </blockquote>
  
  
  
  <p>I have an empty div like this: </p>
  
  <pre><code>&lt;div id="cartContent"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I need to check if it's empty. If it's empty it needs to return true and then some <p> elements are added. If not it returns false and some other function executes. What's the best way to check if there are any <p> elements in the div?</p>
  
  <p>Thanks</p>