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


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: