Click here to Skip to main content
11,641,209 members (63,523 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: jQuery
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

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

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You show an animated gif, probably in a div that makes the whole screen darker, then hide it when this process ends.
  Permalink  
Comments
farham_heidari at 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 at 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)

  Print Answers RSS
0 Mika Wendelius 400
1 OriginalGriff 205
2 DamithSL 203
3 CPallini 185
4 Afzaal Ahmad Zeeshan 129
0 Mika Wendelius 400
1 OriginalGriff 205
2 DamithSL 203
3 CPallini 185
4 Afzaal Ahmad Zeeshan 129


Advertise | Privacy | Mobile
Web04 | 2.8.150731.1 | Last Updated 6 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100