You can use any of the global ajax events that meet your needs here, you’re probably after $.ajaxComplete() or $.ajaxSuccess().
For example:
FYI, ajaxSuccess() would be called when your request successfully does what is assumed to do, means successfully rendered back from server with a 200 OK response. But ajaxComplete() is something which would be called every time a request is being made to the server, irrespective of whether it goes to “success” block of “error” block of your ajax request,the ajaxComplete() block always gets executed.
Source Stackoverflow.
If you have suggestions and corrections please feel free to drop it in the comments section.