hello I’m pretty new at javascript and don’t know how to use it.
I want AJAX Loader to appear when a page loads and after loading is finished I want loader to dissapear. Can anyone post me a code for that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Generally this is done by showing/hiding a div or two over the top of your content. You can get a fancy loading gif from http://www.ajaxload.info/ to get you started. Then you’ll want to place a DIV on your page:
You’ll want this hidden by default, so you’d need to add this CSS:
You’d also want to setup the display for this too:
The file transparentbg.png would be a 25×25 black PNG set to about 80% opaque. Next you would need a way to show and hide this with jQuery:
Now you can use this when you need to do something like querying an external page for data: