In jQuery, the ajaxComplete()
method is used to specify a function that runs when an AJAX request completes.
Syntax
$(document).ajaxComplete(function(event, xhr, options));
Parameters
This method accepts a mandatory function that accepts the following parameters.
event
: The event object
xhr
: The instance of XMLHttpRequest
object
options
: The options used in AJAX request.
Example
The following tab will show the ajaxComplete()
function in action:
Press the “Get Product Data” button to see it in action