Maximus Decimus Maximus Decimus - 2 months ago 10x
Ajax Question

Stop or hide loading panel when start an Ajax action

I have this portion of code globally to show the loading panel in my page.

.ajaxStart(function () {
.ajaxStop(function () {

So, it will automatically show the loading panel anytime that I call an ajax action like this:

type: "GET",
url: "localhost:8080/api/data/Test/GetData",
success: doSomething

But just in a particular case I want to avoid displaying the loading panel. Is there a way to call the


within this code .ajax action or there's a workaround to avoid the loading panel for just some ajax actions instead of calling the fadeIn and fadeOut of each ajax action.


To prevent .ajaxStart() from being fired, it's enough to set global:false when you want to call $.ajax().

If $.ajax() or $.ajaxSetup() is called with the global option set to false, the .ajaxStart() method will not fire.