I have two divs side by side. Neither of them has a standart height, but the first one has content when the other one fill with content after a form submition. I want to set the height of the second one the same with the first one.
Here is the html:
<div id='left'>
...........
</div>
<div id='right'>
...........
</div>
<script type="text/javascript">
$(document).ready ( function(){
var divHeight = document.getElementById('left').style.height;
document.getElementById('right').style.height = divHeight+'px';
});
</script>
I don't have any error on the console, but the height of the second div doesn't change. Any help?
style.heightwill return the inline CSS style and not the computed height of the element.