Loading Image Problems.
Loading Image Problems.
Hello,
I am developing a new site and I have this jquery code to show a loading image:
- function Display_Load()
- {
- $("#loading").fadeIn(900,0);
- $("#loading").html("<img src='images/bigLoader.gif' />");
- }
- //Hide Loading Image
- function Hide_Load()
- {
- $("#loading").fadeOut('slow');
- };
Which is called by:
- $("#divarea").load("includes/get_data.php?page=1&cat=" + cat, Hide_Load());}
It was taken from a jquery pagnation script I found and it works fine except that when you clear your cache for the site (or a new visitor presumably) it will not take the loading image off until you refresh then it will show and then disappear like it is suppose to.
I'm not really sure why, I can only presume it's something to do with loading times, but the page has fully loaded and it will still be shown.
Anyone get any suggestions or is there a way I can make it go after a certain timelimit?
Thanks.