the creation of the Ajax request. For example, you can restrict the
callback to only handling events dealing with a particular URL:

1  2  3  4  5  | 
    
    
    $( document ).on( "ajaxSend", function( event, jqxhr, settings ) {  if ( settings.url == "ajax/test.html" ) {    $( ".log" ).text( "Triggered ajaxSend handler." );  }} );  
  
---|---  
  
###  Additional Notes:

  * As of jQuery 1.9, all the handlers for the [ jQuery global Ajax events ](/category/ajax/global-ajax-event-handlers/) , including those added with ` .on( "ajaxSend", ... ) ` , _must_ be attached to ` document ` . 
  * If ` [ $.ajax() ](/jQuery.ajax/) ` or ` [ $.ajaxSetup() ](/jQuery.ajaxSetup/) ` is called with the ` global ` option set to ` false ` , the ` ajaxSend ` event will not fire. 

##  Example:

Show a message before an Ajax request is sent.

1  2  3  | 
    
    
    $( document ).on( "ajaxSend", function( event, request, settings ) {  $( "#msg" ).append( "<li>Starting request at " + settings.url + "</li>" );} );  
  
---|---  
  
  * [ Ajax ](https://api.jquery.com/category/ajax/)
    * [ Global Ajax Event Handlers ](https://api.jquery.com/category/ajax/global-ajax-event-handlers/)
    * [ Helper Functions ](https://api.jquery.com/category/ajax/helper-functions/)
    * [ Low-Level Interface ](https://api.jquery.com/category/ajax/low-level-interface/)
    * [ Shorthand Methods ](https://api.jquery.com/category/ajax/shorthand-methods/)
  * [ Attributes ](https://api.jquery.com/category/attributes/)
  * [ Callbacks Object ](https://api.jquery.com/category/callbacks-object/)
  * [ Core ](https://api.jquery.com/category/core/)
  * [ CSS ](https://api.jquery.com/category/css/)
  * [ Data ](https://api.jquery.com/category/data/)
  * [ Deferred Object ](https://api.jquery.com/category/deferred-object/)
  * [ Deprecated ](https://api.jquery.com/category/deprecated/)
    * [ Deprecated 1.3 ](https://api.jquery.com/category/deprecated/deprecated-1.3/)
    * [ Deprecated 1.7 ](https://api.jquery.com/category/deprecated/deprecated-1.7/)
    * [ Deprecated 1.8 ](https://api.jquery.com/category/deprecated/deprecated-1.8/)
    * [ Deprecated 1.9 ](https://api.jquery.com/category/deprecated/deprecated-1.9/)
    * [ Deprecated 1.10 ](https://api.jquery.com/category/deprecated/deprecated-1.10-and-2.0/)
    * [ Deprecated 3.0 ](https://api.jquery.com/category/deprecated/deprecated-3.0/)
    * [ Deprecated 3.2 ](https://api.jquery.com/category/deprecated/deprecated-3.2/)
    * [ Deprecated 3.3 ](https://api.jquery.com/category/deprecated/deprecated-3.3/)
    * [ Deprecated 3.4 ](https://api.jquery.com/category/deprecated/deprecated-3.4/)
    * [ Deprecated 3.5 ](https://api.jquery.com/category/deprecated/deprecated-3.5/)
  * [ Dimensions ](https://api.jquery.com/category/dimensions/)
  * [ Effects ](https://api.jquery.com/category/effects/)
    * [ Basics ](https://api.jquery.com/category/effects/basics/)
    * [ Custom ](https://api.jquery.com/category/effects/custom-effects/)
    * [ Fading ](https://api.jquery.com/category/effects/fading/)
    * [ Sliding ](https://api.jquery.com/category/effects/sliding/)
  * [ Events ](https://api.jquery.com/category/events/)
    * [ Browser Events ](https://api.jquery.com/category/events/browser-events/)
    * [ Document Loading ](https://api.jquery.com/category/events/document-loading/)
    * [ Event Handler Attachment ](https://api.jquery.com/category/events/event-handler-attachment/)
    * [ Event Object ](https://api.jquery.com/category/events/event-object/)
    * [ Form Events ](https://api.jquery.com/category/events/form-events/)
    * [ Keyboard Events ](https://api.jquery.com/category/events/keyboard-events/)
    * [ Mouse Events ](https://api.jquery.com/category/events/mouse-events/)
  * [ Forms ](https://api.jquery.com/category/forms/)
  * [ Internals ](https://api.jquery.com/category/internals/)
  * [ Manipulation ](https://api.jquery.com/category/manipulation/)
    * [ Class Attribute ](https://api.jquery.com/c