bigtv bigtv - 1 year ago 81
Javascript Question

Page loading animation

I want to display a loading animation while my page is loading, and when loading is complete then obviously hide it.

I am working in ASP.NET using Masterpages, just wondering there is a a simple way of doing this using JQuery?

Any pointers would be appreciated.


Answer Source

Just place an image with the animated gif on the page. Give it an id of loadingImage and add the following script:


Incidentally, how long is your page taking to load? Is it using AJAX calls to load data? Maybe you should look into this and in the callback handler, call the hide() function on your image.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download