title: How can we hide div if it is blank?
body: <p><strong>Example:</strong> <a href="http://partnerswealth.advisorproducts.com/home" rel="nofollow">http://partnerswealth.advisorproducts.com/home</a>
  <br />
  <a href="http://mah.advisorproducts.com/home" rel="nofollow">http://mah.advisorproducts.com/home</a></p>
  
  <p><strong>Requirement:</strong></p>
  
  <p>I want to hide Left and Right div or Box when it is empty.</p>
  
  <p><strong>Below is the HTML code i am using:</strong></p>
  
  <pre><code>&lt;div class="Box secondaryBackground"&gt;
  &lt;div class="innerBox containerBackground"&gt;
  &lt;h2&gt; &lt;/h2&gt;
  &lt;div class="innerBoxContent"&gt;
  &lt;div class="eNews"&gt; &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Below is the js i am using</strong> - and trying to add <strong>DispNone</strong> class only in that Box class div whose <strong>innerBoxContent</strong> children div is empty.</p>
  
  <p>So i just want to add class in Box class div if <strong>innerBoxContent</strong> class div children like eNews is empty.</p>
  
  <pre><code>$(document).ready(function () {
      str = $('.innerBoxContent &gt; div').text();
      if ($.trim(str) === "") {
          $('.innerBox').parent().addClass('DispNone');
      }
      else {
          $('.innerBox').parent().removeClass('DispNone');
      }
  });
  </code></pre>
  
  <p>Can we modify this code? </p>
  
  <p>Right now its adding class to all innerBox div but i want only for those div whose last child element is empty like .eNews not for all.
  Thanks
  Sushil</p>