ドキュメント

Ajax/ajaxSend

From jQuery JavaScript Library

Jump to: navigation, search

« Back to Ajax

ajaxSend( callback )

Attach a function to be executed before an AJAX request is sent. This is an Ajax Event.
The 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 before an AJAX request is sent.

 $("#msg").ajaxSend(function(evt, request, settings){
   $(this).append("<li>Starting request at " + settings.url + "</li>");
 });

NameType