Question: On my ASP.NET MVC website I have the following inside my layout.cshtml:

```
$(document).ajaxStart(function () {
    $(".modal").fadeIn(300)
});

$(document).ajaxStop(function () {
    $(".modal").fadeOut(300);
});

```

The .modal class is basically a div that shows a gif with a typical animation inside.

So I don't want this animation to appear on all my ajax calls. Is there anyway to know which specific ajax call is raising this event? 

The other option would be to manually handle it inside all my ajax calls, but since I only have 1 ajax call that I want to exclude it doesn't make sense.

Thanks

Answer: 
On your individual call, set the global option for the ajax call to false:

```
$.ajax({
    global: false,     // this will prevent start from being called.
});

```
I have faced a similar problem before and I found a solution here on stackoverflow, but I can't remember or find exactly the same solution as I found before but you might find this answer interesting [JavaScript detect an AJAX event](https://stackoverflow.com/questions/3596583/javascript-detect-an-ajax-event) and if that isn't enough, then I'd extend the ajax calls in whichever js framework you are using.