jQuery get total height

[javascript]
$.fn.totalHeight = function() {
var total = 0;
this.each(function(i, el) {
total += $(el).height();
});
return total;
};
$.fn.totalOuterHeight = function() {
var total = 0;
this.each(function(i, el) {
total += $(el).outerHeight();
});
return total;
};
[/javascript]

Leave a Reply