Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7910747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:59:11+00:00 2026-06-03T12:59:11+00:00

I am trying to load page with ajax and its working fine without issue

  • 0

I am trying to load page with ajax and its working fine without issue but I want to add fadeIn fadeOut effect and loader gif animation.

Can anyone please help me to do that. I am using below code.

$(document).ready(function(){
    // load index page when the page loads
    $("#main").load("content.php");

    $("#home").click(function(){
    // load home page on click
        $("#main").load("content.php");
    });
    $("#mediakit").click(function(){
    // load about page on click
        $("#main").load("mm-media-kit.php");
    });
});

I am not experienced with jquery.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T12:59:12+00:00Added an answer on June 3, 2026 at 12:59 pm

    You can use http://api.jquery.com/ajaxStart/ and http://api.jquery.com/ajaxStop/ to show and hide a loading image in this case. Like this

    I am assuming you have a loading image div with id loading somewhere in your page which is initially hidden. Then you can show loading image using this two function above like this

    //show the loader at the start of ajax request
    $("#loading").ajaxStart(function(){
       $(this).show();
     });
    //hide the loader when ajax request Completes
    $("#loading").ajaxComplete(function(){
       $(this).hide();
     });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run a function on page load but its not working.
Im trying to load a page I created using ajax, which loads fine and
I'm trying to change pageindex on page_Load event but its not working. I can
I am trying to get a default query to implement upon page load but
I have a page which uses a fair bit of ajax to load its
I'm trying to get my AJAX call working with the rails 3, but I'm
I'm trying to load page and then remove some elements in it. While doing
I'm trying to load one page into another using the .load() method. This loaded
I'm trying to load a page using the load() function, the problem is that
I am trying to load mschart in my aspx page(SalesOverview.aspx) using jQuery.load() method, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.