My website is filled with images, and in order to speed up the loading time, I added a loading screen. Currently, it's a white overlay with the following 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);
}
Here is the jQuery code I currently have:
$(window).load( function(){
$("#loader").fadeOut("slow");
});
Right now, the loading screen and the rest of the website load simultaneously, creating a messy look.
Is there a way to ensure that the rest of the page only loads once the loading screen is fully displayed?