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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:44:37+00:00 2026-05-25T16:44:37+00:00

I have a 6kb animated gif loading spinner. when I open it in a

  • 0

I have a 6kb animated gif loading spinner. when I open it in a browser window, it spins fine. But when it opens on an ajax call on my web page, it is stuck. It appears ontime and disappears ontime, but does not spin.

Any ideas?

Here is the jQuery code:

        $('#please-wait')
        .css("visibility", "visible")//.hide()
        .ajaxStart(function() {
            $(this).css("visibility", "visible");
        })
        .ajaxStop(function() {
            $(this).css("visibility", "hidden");
        });

or

        $('#please-wait')
        .show()
        .ajaxStart(function() {
            $(this).show();            
        })
        .ajaxStop(function() {
            $(this).hide();
        });

any ideas?

  • 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-05-25T16:44:38+00:00Added an answer on May 25, 2026 at 4:44 pm

    Here is a jsfiddle example of how it should or could be done.

    Here’s a snippet

    $('#start_loading').click(function(){
        $('#display').html('<img src="http://thinkfuture.com/wp-content/uploads/2013/10/loading_spinner.gif" />');
        setTimeout(function(){
            $('#display').html($('#content').html());
        }, 1000);
    });
    
    $('#reset').click(function(){
        $('#display').html('');
    });
    body{
      background-color: white;
    }
    
    #content{
        display:none;
    }
    
    #display{
        margin-top: 10px;
    }
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="http://code.jquery.com/jquery-1.6.3.min.js" type="text/javascript"></script>  
    <button id='start_loading'>Load text</button>
    <button id='reset'>Reset</button>
    
    <div id='display'>
    </div>
    
    <div id='content'>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin risus ipsum, hendrerit vitae facilisis sit amet, viverra sit amet elit. Nullam interdum sodales tortor quis suscipit. Donec facilisis condimentum sodales. Nunc imperdiet vehicula aliquam. Etiam non ligula enim, non euismod dui. Aliquam in fermentum neque. Praesent auctor lectus eu magna gravida convallis. Donec semper hendrerit porta. In feugiat tellus a purus vulputate adipiscing. Aenean et risus nec nisl auctor scelerisque. Duis eleifend nunc ut odio consectetur scelerisque.</p><br/>
    
        <p>Aliquam in scelerisque erat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aenean dignissim orci at quam placerat a placerat sem porta. Nulla facilisi. Ut ligula lorem, faucibus sit amet eleifend id, fringilla ut orci. Aliquam viverra, enim a auctor tincidunt, neque dui sollicitudin enim, eget feugiat odio lacus cursus lacus. Nunc risus urna, elementum eu vehicula in, fringilla et ante. Aenean iaculis volutpat purus, vitae faucibus justo auctor at. Integer non fringilla nibh.</p><br/>
    
    <p>Quisque elementum, sapien in viverra mollis, magna nisl blandit tortor, ut tincidunt risus nulla id nunc. Fusce rutrum elementum mauris, id aliquam magna varius sed. Ut vestibulum elementum sapien et sagittis. Vestibulum vitae sem arcu. Nulla lacus dui, lacinia vitae dapibus ac, tincidunt vel lectus. In hac habitasse platea dictumst. Curabitur interdum ullamcorper odio, ullamcorper mollis ligula auctor eget. Donec aliquet arcu sed est dignissim pharetra. Praesent sit amet dui venenatis nisl ullamcorper convallis. Morbi rutrum neque id dui venenatis et bibendum felis placerat. </p>
    </div>

    If you’re doing the right parts of JQuery then the odds are your .gif doesn’t have a repeat cycle, meaning it only animates once. Since you only hide it instead of adding/removing, it doesn’t reset the animation.

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

Sidebar

Related Questions

Have following listener for keyboard ArrowDown event(it's key code is 40 ): window.onload =
Have converted devise new session from erb to Haml but doens't work, this is
Have searched the database but need to specifically sum(of hours flown or days off)in
Have a fun issue with sharepoint calendar view filtering. That code works fine: SPSecurity.RunWithElevatedPrivileges(delegate()
Have this method call: -> simpleJdbcTemplate.queryForInt(SQL,null); -> queryForInt() method in the springs SimpleJdbcTemplate throws
Have a large amount of HTML, but where I thought the bottleneck would be
Have been scatching my head about this - and I reckon it's simple but
I have a routine to correctly allocate and deallocate my UIView subclass, but when
Have just started using Google Chrome , and noticed in parts of our site,
Have you ever seen any of there error messages? -- SQL Server 2000 Could

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.