Here is a fiddle: http://jsfiddle.net/yj8sL/2/
$(function(){ var totalHeight = 0; $("#parent > div").each(function(){ totalHeight += $(this).height(); }); alert("Total height of all divs: "+totalHeight); });
As you can see, there are 5 sections with a height of 100 pixels each, so the total height is 500 pixels.
EDIT: Your next problem (with animation) is that you are not saying which block you are using (in your case, pixels):
$("#events").animate({ "height": ev_totalHeight+"px" }, 450 );
source share