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

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -