Commit 8530a2fc authored by Timmy Willison's avatar Timmy Willison

Ajax: move ajax event aliases to their own file

Fixes #15126
parent 369add5f
...@@ -38,7 +38,7 @@ module.exports = function( grunt ) { ...@@ -38,7 +38,7 @@ module.exports = function( grunt ) {
"selector" "selector"
], ],
removeWith: { removeWith: {
ajax: [ "manipulation/_evalUrl" ], ajax: [ "manipulation/_evalUrl", "event/ajax" ],
callbacks: [ "deferred" ], callbacks: [ "deferred" ],
css: [ "effects", "dimensions", "offset" ] css: [ "effects", "dimensions", "offset" ]
} }
......
...@@ -796,12 +796,5 @@ jQuery.each( [ "get", "post" ], function( i, method ) { ...@@ -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; return jQuery;
}); });
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 );
};
});
});
...@@ -23,6 +23,7 @@ define([ ...@@ -23,6 +23,7 @@ define([
"./ajax/script", "./ajax/script",
"./ajax/jsonp", "./ajax/jsonp",
"./ajax/load", "./ajax/load",
"./event/ajax",
"./effects", "./effects",
"./effects/animatedSelector", "./effects/animatedSelector",
"./offset", "./offset",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment