aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gruntfile.js2
-rw-r--r--src/ajax.js7
-rw-r--r--src/event/ajax.js13
-rw-r--r--src/jquery.js1
4 files changed, 15 insertions, 8 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index 1527206f1..0bee7a8e8 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -39,7 +39,7 @@ module.exports = function( grunt ) {
],
// Exclude specified modules if the module matching the key is removed
removeWith: {
- ajax: [ "manipulation/_evalUrl" ],
+ ajax: [ "manipulation/_evalUrl", "event/ajax" ],
callbacks: [ "deferred" ],
css: [ "effects", "dimensions", "offset" ],
sizzle: [ "css/hiddenVisibleSelectors", "effects/animatedSelector" ]
diff --git a/src/ajax.js b/src/ajax.js
index d39de2a9b..502b33b2a 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -795,12 +795,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;
});
diff --git a/src/event/ajax.js b/src/event/ajax.js
new file mode 100644
index 000000000..278c403ee
--- /dev/null
+++ b/src/event/ajax.js
@@ -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 );
+ };
+});
+
+});
diff --git a/src/jquery.js b/src/jquery.js
index 46460fa96..d3857e955 100644
--- a/src/jquery.js
+++ b/src/jquery.js
@@ -22,6 +22,7 @@ define([
"./ajax/script",
"./ajax/jsonp",
"./ajax/load",
+ "./event/ajax",
"./effects",
"./effects/animatedSelector",
"./offset",