I got two div's on a layered website one in the background (flexible height). And one in front (also with flexible height).
What i want to do is to scale the front div to always be higher than the background div. I have done this with the following jquery code.
var contentMinHeight = $j('#leftCol').height() + 65;
if($j('#content').height() < contentMinHeight) {
$j('#content').height(contentMinHeight + 'px');
}
It works great most of the time. But some times it fails (Firefox 3.5.7 for mac), and just stop all of the other jquery code going on at the page (like my animated menu etc.)