ドキュメント

Ajax/ajaxSuccess

From jQuery JavaScript Library

Jump to: navigation, search

« Back to Ajax

ajaxSuccess( callback )

Attach a function to be executed whenever an AJAX request completes successfully. This is an Ajax Event.
The event object, XMLHttpRequest, and settings used for that request are passed as arguments to the callback.
Arguments:
callbackFunction
The function to execute.
function (event, XMLHttpRequest, ajaxOptions) {
  this; // dom element listening
}
Examples:

Show a message when an AJAX request completes successfully.

 $("#msg").ajaxSuccess(function(evt, request, settings){
   $(this).append("<li>Successful Request!</li>");
 });

NameType