I have an image heavy website, and to improve the loading of it, I have implemented a loading screen. At the moment, it is a white overlay with this css:
#loader{
width: 100%;
height: 100%;
position: fixed;
z-index: 9999999999999999;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: url('loader.gif') 50% 50% no-repeat rgb(255,255,255);
}
This is the jQuery that I have at the moment:
$(window).load( function(){
$("#loader").fadeOut("slow");
});
At the moment this loading screen loads at the same time as the rest of the website, and it looks messy.
How would I be able to only load the rest of the page once the loading page it loaded and displayed?