height - Measure highest UL Tag with jQuery -
im trying measure , grab highest of ul tags.
markup simple.
<ul class="ul_class"> <li>one</li> <li>two</li> <li>three</li> </ul> <ul class="ul_class"> <li>a</li> <li>b</li> <li>c</li> <li>d</li> <li>e</li> </ul> <ul class="ul_class"> <li>a1</li> <li>b1</li> <li>c1</li> <li>d1</li> <li>e1</li> <li>f1</li> </ul>
so im displaying ul blocks. highest te 1 has mosl li tags in it, how can height variable?
thank in advance
you can use $('selector').height() on each 1 , find tallest
http://docs.jquery.com/css/height
something like
var max = 0; $('.ul_class').each(function(){ var h = $(this).height(); if(h > max) max = h; }); // max max here.
Comments
Post a Comment