title: Loop Through Divs and Check If Child Div Has Content
body: <p>I'm looking to loop through divs, check if each has content within it's specific child div, if so add a class to the div.</p>
  
  <pre><code>  $('.img-banner').each(function( index, element ) {
      if ( $(element).find('.img-banner-content').length &gt; 0 ) {
        $(element).addClass("has-content");
      }
    });
  </code></pre>
  
  <p>I'm missing something simple here and could do with a shake.  The issue is it's adding the class "has-content" to all divs.</p>
  
  <p>Reduced test case: <a href="https://jsfiddle.net/yabe5s21/" rel="nofollow">JSFiddle</a></p>
  
  <p>Thanks all.</p>