4
I have a page with a side menu, and the contents of this menu is opened within an iframe.
CSS
#preloader {
position: absolute;
left: 0px;
right: 0px;
bottom: 0px;
top: 0px;
background: #ccc;
z-index: 9999;
}
ALBUM.PHP
<body>
<div id="preloader"><img src="images/loading_azul.gif"></div>
<div id="conteudo">
...
JS
$(document).ready(function(){
//Esconde preloader
$(window).load(function(){
$('#preloader').fadeOut(1500); //1500 é a duração do efeito (1.5 seg)
});
});
The problem is that only at the end of this load, it shows the animation of the gif on the screen, just before hiding.
Can anyone tell me why?
What makes the function
carregando()
? And where is the HTML#carregando
and#loading
?– Sergio
This is Html: <div id="loading"><img src="images/loading.gif"></div>
– Ricardo
Ok, and where is it? inside the menu? iframe? Can you put the full HTML? so we’ll be guessing...
– Sergio
It is inside the album.php page, which opens inside the iframe, only not put it because it has many lines...
– Ricardo
@Sergio edited the question, see if it was clearer.. Vlw!
– Ricardo
It was even less clear :) So have a div
<div id="conteudo">
that has the same ID as the iframe?<iframe id="conteudo"...
– Sergio
I didn’t realize they had the same name?
– Ricardo
Could be. Ids have to be unique. If not, I need even more code to help. JS and HTML...
– Sergio
Blz, I’ll change and check if funf. Otherwise the night I try to send more details... vlw for now!
– Ricardo
@Sergio, I edited the question and put the link to see what is happening
– Ricardo
Let’s go continue this discussion in chat.
– Ricardo
Ricardo, is working on Internetexplorer, but just missed set a better height. It does what you are qurendo. Test in other browsers.
– Lollipop
Rafael, it’s true I was only seeing in Firefox. In Chrome it seems that it’s round too... I’ll change the height yes, you can leave! Vlw
– Ricardo