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?
Asked
Active
Viewed 286 times
0
-
FYI: The link mentioned is broken, at least at the moment, and I do not see a version post 1.0. – Anthony Mason Mar 28 '14 at 19:59
1 Answers
2
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

Waltsu
- 612
- 6
- 10
-
I tried that but it loads AFTER everything gets loaded (or at least after the PHP loads which is what I want to indicate that is loading) – Tsundoku Jul 19 '11 at 10:25
-
1You could try that you echo the animation-code first in php code. And when the DOM is ready remove animation in .ready()-function. – Waltsu Jul 19 '11 at 12:03