To trail every div in a dom using jQuery
<p>i have to trail the divs in a DOM which height is less then 100px. so for that i use each function. but it didnt work.
this is the code i tried..</p>

<pre><code>jquery('div').each(function(){
  if(jQuery(this).height()&lt; 40){
    jQuery(this).remove();
  }
</code></pre>

<p>The HTML for the divs looks like this:</p>

<pre><code>&lt;div class="foo"&gt;&lt;/div&gt; 
&lt;div class="foo"&gt;&lt;/div&gt; 
&lt;div class="foo"&gt;&lt;/div&gt; 
&lt;div class="foo"&gt;&lt;/div&gt; 
&lt;div class="goo"&gt;&lt;/div&gt; 
&lt;div class="loo"&gt;&lt;/div&gt; 
&lt;div class="goo"&gt;&lt;/div&gt; 
&lt;div class="loo"&gt;&lt;/div&gt; 
</code></pre>

<p>and the css for each class causes different heights.</p>
