I think this is a pretty straightforward problem but...
var outerHeight = $(\'.profile\').outerHeight();
$(\"#total-height\").text(outerHeight + \'px\');
$("selector")
is already a collection. Access directly the .outerHeight()
or any other method like .height()
var total = 0;
$("div").outerHeight(function(i, v){
total += v;
});
alert( total ); // Just to test
var total = 0;
$("div").outerHeight(function(i, v){ total += v; });
alert( total );
div{background:#eee; margin:3px;}
100px
just lots of breaklines :)
200px