mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 20:55:01 -05:00
@@ -796,12 +796,5 @@ jQuery.each( [ "get", "post" ], function( i, method ) {
|
||||
};
|
||||
});
|
||||
|
||||
// Attach a bunch of functions for handling common AJAX events
|
||||
jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
|
||||
jQuery.fn[ type ] = function( fn ) {
|
||||
return this.on( type, fn );
|
||||
};
|
||||
});
|
||||
|
||||
return jQuery;
|
||||
});
|
||||
|
||||
13
src/event/ajax.js
Normal file
13
src/event/ajax.js
Normal file
@@ -0,0 +1,13 @@
|
||||
define([
|
||||
"../core",
|
||||
"../event"
|
||||
], function( jQuery ) {
|
||||
|
||||
// Attach a bunch of functions for handling common AJAX events
|
||||
jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
|
||||
jQuery.fn[ type ] = function( fn ) {
|
||||
return this.on( type, fn );
|
||||
};
|
||||
});
|
||||
|
||||
});
|
||||
1
src/jquery.js
vendored
1
src/jquery.js
vendored
@@ -23,6 +23,7 @@ define([
|
||||
"./ajax/script",
|
||||
"./ajax/jsonp",
|
||||
"./ajax/load",
|
||||
"./event/ajax",
|
||||
"./effects",
|
||||
"./effects/animatedSelector",
|
||||
"./offset",
|
||||
|
||||
Reference in New Issue
Block a user