1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to stop the Ajax loading icon appearing when Javascript runs in the background

Discussion in 'XenForo Development Discussions' started by Nomy, Jun 7, 2016.

  1. Nomy

    Nomy Member

    Hello guys,

    I had recently created a sidebar widget using widgets addon. I use JavaScript to populate the updated information in the widget using JQuery's getJSON function. This runs every minute and every time this function runs, it makes the Ajax loading icon appear for second.

    How do make it silent?

    Any help will be much appreciated.

    Edit: I'm going to answer myself since I searched deeper and found the answer:
    Instead of using the shorthand getJSON, I used full ajax function and use the option global: false

    It no longer shows ajax loading gif when ran.
    Last edited: Jun 7, 2016
    AndyB likes this.

Share This Page