shshanker
12/21/2016 - 4:09 PM

Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.

Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.

$( document ).ajaxSuccess(function( event, xhr, settings ) {
  if ( settings.url == "ajax/test.html" ) {
    $( ".log" ).text( "Triggered ajaxSuccess handler. The Ajax response was: " +
      xhr.responseText );
  }
});