-
-new function(){
- var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess".split(",");
-
- for ( var i = 0; i < e.length; i++ ) new function(){
- var o = e[i];
- jQuery.fn[o] = function(f){
- return this.bind(o, f);
- };
+
+/**
+ * Attach a function to be executed before an AJAX request is sent.
+ *
+ * The XMLHttpRequest and settings used for that request are passed
+ * as arguments to the callback.
+ *
+ * @example $("#msg").ajaxSend(function(request, settings){
+ * $(this).append("<li>Starting request at " + settings.url + "</li>");
+ * });
+ * @desc Show a message before an AJAX request is sent.
+ *
+ * @name ajaxSend
+ * @type jQuery
+ * @param Function callback The function to execute.
+ * @cat Ajax
+ */
+jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
+ jQuery.fn[o] = function(f){
+ return this.bind(o, f);