I have tryed all the suggestions but none seem to work with this plugin. I am not using a ajax call, the delay is due to some data map rendering issue.
I followed this method: http://bradsknutson.com/blog/display-loading-image-while-page-loads/
Altough I add the div tag at the very begining of my html, when I debug the code I saw it after many div tags that belongs for the plugin. Summed it up, it isn't at the top of the html.
The .js and the .css are the same in the example.
So I have
html
<div class="loader"></div>
css
.loader {
position: fixed;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 9999;
background: url('images/page-loader.gif') 50% 50% no-repeat rgb(249,249,249);
}
js
$(window).load(function() {
$(".loader").fadeOut("slow");
})
Side note: I tryed to replace fadeOut for hide().
This method isn't working, thanks