javascript - Jquery function to find out max height of <li> -


i want find out out of given <li> li has maximum height? how write such function?

if there n <li> elements of different size, content , height. want figure out maximum height of biggest <li> element.

try this:

var max = -1; $("li").each(function() {     var h = $(this).height();      max = h > max ? h : max; }); alert(max); 

Comments

Popular posts from this blog

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -