I've got a login page that redirects you to an index page, the index page has this code:
<script type="text/javascript">
<div id="overlay">
<img src="loading.gif" alt="Loading" />
Loading...
</div>
jQuery:
$(window).load(function(){
$('#overlay').fadeOut();
});
</script>
It loads just a simple modal. The issue is that the it shows the modal after a few seconds of delay. No just when the page is loading. The index page is heavy in content.
What I want is that just when for example chrome is loading (it's show a little circle spinning) my page show the modal. The seconds of delay I think is why index its heavy.