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

Popular posts from this blog

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -