jQuery get total height

$.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;
};

Leave a Reply