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 8158489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:37:04+00:00 2026-06-06T17:37:04+00:00

I got the delay to work when you click on the buttons but I

  • 0

I got the delay to work when you click on the buttons but I cant get the loading gif to display during the delay.

Thanks

function () {
    $('.sectionThreeTab:not(.tabActive)').click(function () {
        $('ajax-loader.gif').bind('ajaxStart', function () {
            $(this).show();
        }).bind('ajaxStop', function () {
            $(this).hide();
        });
        $('.tabActive').removeClass('.tabActive');
        $(this).addClass('tabActive');
        var lesson = $(this).attr('lesson');
        var self = $(this);
        setTimeout(function () {
            $.ajax({
                type: "GET",
                url: 'lessons/' + lesson + '.htm',
                datatype: "json",
                success: function (data) {
                    $('#sectionTabContent').append(data);
                }
            })
        }, 3000);
        return false;
    });
}
  • 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-06T17:37:06+00:00Added an answer on June 6, 2026 at 5:37 pm

    You can try this instead of what you have:
    Delete this part:

    $('ajax-loader.gif').bind('ajaxStart', function () {
                $(this).show();
            }).bind('ajaxStop', function () {
                $(this).hide();
            });
    

    And change the setTimeout to this:

    setTimeout(function () {
                $("#loading").show();
                $.ajax({
                    type: "GET",
                    url: 'lessons/' + lesson + '.htm',
                    datatype: "json",
                    success: function (data) {
                        $('#sectionTabContent').append(data);
                    },
                    complete: function() {
                        $("#loading").hide();
                    }
                })
            }, 3000);
    

    Please also post your html so we can see if everything else is in order.

    Edit:

    <div id="loading" class="grayBackground withBorder10" style="display:none"> 
    <img alt="Loading..." src="img/ajax-loader.gif" />
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to ultimately get this code to work: function Timer(callback, delay) {
I used url.openConnection() to get text from a webpage but i got time delay
got a simple web site, in html. I do a simple function to move
got a problem, can't get my head around this jquery and would appreciate your
So I've got my jquery autocomplete 'working,' but its a little fidgety since I
I've got a query I wrote using a JOIN to display a summary using
I've got a 4-states button. I would like to know how to delay the
I'm making simple game with very simple thread (1 sec delay) got problem with
Is std::async supose to work with template function? I've tried to lauch std::reverse as
I've got the following code and i would like to add an delay of

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.