How can I make an animated gif appear when the site is loading and disappear after it's done loading?

302 Views Asked by At

I've been using the plugin in here: http://contextllc.com/tools/jQuery-showLoading which works perfectly when it's an ajax request or any other element interaction but how to get the animation appear when the site is first loading and have it disappear after it finishes loading?

1

There are 1 best solutions below

2
On BEST ANSWER

You can use javascripts onLoad event to show the animation and jquery .ready()-function to remove it. More about onload event and more about .ready()-function