amit amit - 1 year ago 76
Javascript Question

Jquery function to find out max height of <li>

I want to find out that out of the given

has the maximum height?
how do i write such function?

If there are n
elements of different size, content and height. I want to figure out the maximum height of the biggest

Answer Source

Try this:

var max = -1;
$("li").each(function() {
    var h = $(this).height(); 
    max = h > max ? h : max;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download