title: jQuery if div empty
body: <p>I'm working on wordpress template where div.post-thumb is empty but have dynamic white spaces.</p>
  
  <pre><code>&lt;div class="post-thumb"&gt;    &lt;/div&gt;
  &lt;div class="post-text"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I'm using following script to detect if div.post-thumb is empty.</p>
  
  <pre><code>$('.post-thumb').each(function(){
  if ($(this).html()=='') $('.post-text').css('marginLeft','50px');
  }); 
  </code></pre>
  
  <p>Problem with this script is "Dynamic white spaces within div.post-thumb"</p>
  
  <p>How to get rid of this issue? Is there any other way to detect if div is empty excluding white spaces?</p>