In the onload
event of my site, I load a function in which it makes a loading gif that was appearing, sum for the content of the site to appear.
<body onload="carregar()">
<div id="preload">
<img src="_imagens/loading.gif">
</div>
<div id="conteudo">
//Aqui tem todo o site, cabeçalhos, rodapés, a interface inteira.
</div>
The function is this:
function carregar(){
preload = document.getElementById("preload").style.display = 'none';
div = document.getElementById("conteudo").style.display = 'block';
}
Only things happen very fast and the effect does not get cool. I would like the gif to disappear with fade of 0.5s and the content would appear with another fade in the same way. I know this is JQuery, I just do not know how to do that.