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
Post a Comment