Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i use this jQurey function for load page in my web site how can i make a simple loding for show to user that my page is loding

JavaScript
$("#home").find("div").live({
		click:function(){
			var addr=$(this).attr('page');
			creatContent();
			$("#content").load("Pages/"+addr);
			hideDesktop();
			addTolbar(addr,Pageid);
			}	
		});
Posted

1 solution

You show an animated gif, probably in a div that makes the whole screen darker, then hide it when this process ends.
 
Share this answer
 
Comments
farham_heidari 6-Jan-13 15:43pm    
how can i understand that process ends? plz show me part of code that calculate the time of loading
Christian Graus 6-Jan-13 15:45pm    
If you want it to know when the whole page finishes loading, you need to hide it in the loaded event of the new form. Otherwise you have no way to know when it's loaded all the images, etc. Otherwise, I'd assume you'd think it was over when these methods finished running. It's toolbar, not tolbar, by the way.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900