I have a series of boxes:
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
The css:
.box {
height: auto;
}
The actual height is set only once the boxes are loaded with content, therefore I don’t know their height at start.
$(".box").each(function(){
boxHeight = $(this).height();
});
Bu that’s wrong, basically I need to save those heights and be able to reuse them later on
If you need to save the heights for later then use jQuery’s data object to store the value.
Updated my answer based on Jasper’s feedback and added a fiddle
http://jsfiddle.net/mrtsherman/5LvJT/
You can then access the height for each one later on via