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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:19:00+00:00 2026-06-14T12:19:00+00:00

For some reason, my Ajax loader icon is not showing and hiding as it

  • 0

For some reason, my Ajax loader icon is not showing and hiding as it should. Here’s my snippet of jQuery code that handles the ajax call. I can see the #loading DIV with Chrome’s Developer Tools…the problem lies is that jQuery is not showing the DIV (inline style set to display:none on the div itself). If I remove that inline style, it shows up where it should…

Anything I’m missing here?

//website URL grab - Ajax call
$('.loadBTN').on("click", function(){

    var check_url = $('#web_address').val();

    if (!check_url || check_url == 'http://') { // form validation
        //alert('Please enter valid URL');
        // Do nothing
        return false;
    };

    var web_url = {
        url: $('#web_address').val(),
        ajax: '1' // needed for controller, to verify that request is ajax
    };         

    //display ajax loader animation
    $('#loading').show();

    $.ajax({
        url: 'ajax/web_embed',
        type: 'POST',
        data: web_url,
        success: function(msg) {
            $('#ajaxContent').html(msg); // output success in this container
            $('#loading').hide();
        } 
    });        


    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-14T12:19:01+00:00Added an answer on June 14, 2026 at 12:19 pm

    I would suggest subscribing to all ajax start/stop events, independently of who’s responsible for it:

    $("#loading")
        .ajaxStart(function(){ $(this).show(); })
        .ajaxStop(function(){ $(this).hide(); });
    

    The loading will appear as soon as there is an ajax request, then hide when there is no ajax requests ongoing…

    See http://api.jquery.com/ajaxStart/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a pretty straightforward jQuery AJAX piece of code that should submit the
for some reason my Firefox4+GreaseMonkey Script loads jQuery twice. I copy'n'pasted the following snippet,
For some reason, if I add these buttons with jQuery (because of an Ajax
For some reason the € is not showing even though this is my header:
For some reason the ajax requests I make on the website I'm working on
I've implemented more complex AJAX before with javascript and PHP, but for some reason
For some reason, this line of code is returning undefined for $(this).attr(href) $(a).attr(href, javascript:page('
For some reason there's a variable called d that is defined immediately after I
For some reason, my spec isn't passing. It appears that @categories isn't getting to
I have a jQuery function that uses ajax to get data, then displays it,

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.