To trail every div in a dom using jQuery -
To trail every div in a dom using jQuery -
i have trail divs in dom height less 100px. utilize each function. didnt work. code tried..
jquery('div').each(function(){ if(jquery(this).height()< 40){ jquery(this).remove(); }
the html divs looks this:
<div class="foo"></div> <div class="foo"></div> <div class="foo"></div> <div class="foo"></div> <div class="goo"></div> <div class="loo"></div> <div class="goo"></div> <div class="loo"></div>
and css each class causes different heights.
use this
jquery('div').each(function(){ if(jquery(this).height()< 40){ jquery(this).remove(); } });
you have add together in end })
, capitalize q
in jquery
demo: http://jsfiddle.net/sotiris/xnhun/
jquery
Comments
Post a Comment