Reputation: 502
I read this.
I want to write a function which will make my page load slow(for perticular time), and I want to display browser's loading icon until the page loads completely, delay didn't worked as it only works with animation effects
Upvotes: 0
Views: 125
Reputation: 6907
Keep your loading icon within a div with id loader
with CSS as following.
#loader {
position: fixed;
width: 100%;
height: 100%;
left: 0px;
top: 0px;
}
And your jQuery as:
$(window).load(function() {
$("#loader").hide();
});
Upvotes: 2