Reputation: 10021
I have an event:
$(document).ajaxComplete
which works fine. However, I want to check if ajax occurred at a specific location in the document. Is there a way to check which ajax call occurred?
$(document).ajaxComplete(function() {
if (???) //code
else //code
}
Upvotes: 0
Views: 264
Reputation: 353
I think the only way is to define success function for each ajax function like this :
$.ajax({
url: "...",
success: function(html){
//if success
};
});
Upvotes: 2