I think this is a pretty straightforward problem but...
var outerHeight = $(\'.profile\').outerHeight(); $(\"#total-height\").text(outerHeight + \'px\');
More modern option:
let height = 0 $('.profile').each((i, el) => height += $(el).outerHeight())