aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2014-06-02 12:39:11 -0400
committerTimmy Willison <timmywillisn@gmail.com>2014-06-02 12:41:24 -0400
commit8530a2fc726bf70cf57631c6054dd99488e890d7 (patch)
treeb120519b21c1930b465b1a33510d0759a6f9eef3
parent369add5f1d2128559aacd76b224d5171ba151eca (diff)
downloadjquery-8530a2fc726bf70cf57631c6054dd99488e890d7.tar.gz
jquery-8530a2fc726bf70cf57631c6054dd99488e890d7.zip
Ajax: move ajax event aliases to their own file
Fixes #15126
-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 73692cbbb..b9eb73951 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -38,7 +38,7 @@ module.exports = function( grunt ) {
"selector"
],
removeWith: {
- ajax: [ "manipulation/_evalUrl" ],
+ ajax: [ "manipulation/_evalUrl", "event/ajax" ],
callbacks: [ "deferred" ],
css: [ "effects", "dimensions", "offset" ]
}
diff --git a/src/ajax.js b/src/ajax.js
index 1b01fd6a5..869d0fa4e 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -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;
});
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 ac5ea9fd7..7c1528b88 100644
--- a/src/jquery.js
+++ b/src/jquery.js
@@ -23,6 +23,7 @@ define([
"./ajax/script",
"./ajax/jsonp",
"./ajax/load",
+ "./event/ajax",
"./effects",
"./effects/animatedSelector",
"./offset",