I made a one-page site and to calculate the size of the main divs I used this JS:
function tamanhos(){
$('#a, #b, #c, #d').css('min-height', $(window).height());
}
$(window).load(tamanhos);
$(window).resize(tamanhos);
The issue is that with window
the site opens with the divs all crushed, then after loading everything it puts the right size.
I have some other option to calculate the size of the divs, but that does not break while the site is loading?
I want when the site opens each div to have at least the size of the screen. What happens now is that the divs open all crushed and after a while they adjust to the correct size.
HTML:
<div id='conteudo'>
<div id='a'></div>
<div id='b'></div>
<div id='c'></div>
<div id='d'></div>
</div>