I have the .ajaxComplete event wired up to a few elements like this:
$("#ElementId").ajaxComplete(function (a, b, c) { });
The issue is that I have multiple $.ajax calls in my script that are called by various functions. I don’t want the .ajaxComplete event to fire for every control for every ajax call. Conceptually, I am looking for something like this:
if (a.function == SearchCustomers) { do this }
Is there any way to achieve what I want here?
Edit: I realize that I can check for the URL of the service I am calling, but I don’t want to hardcode a URL string in my scripts more than once.
You have to do it this way: