I have a set of div elements. In jQuery I would like to know the div with the maximum height, as well as the height of this div . For example:
<div> <div class="panel"> Line 1 Line 2 </div> <div class="panel"> Line 1<br/> Line 2<br/> Line 3<br/> Line 4<br/> </div> <div class="panel"> Line 1 </div> <div class="panel"> Line 1 Line 2 </div> </div>
Looking above, we know that the 2nd div (with 4 lines) has a maximum height. How to find out? Can anybody help?
So far I have tried:
$("div.panel").height() , which returns the height of the 1st div .
jquery
lshettyl May 19 '11 at 15:22 2011-05-19 15:22
source share