]> source.dussan.org Git - jquery.git/commitdiff
Ajax: move ajax event aliases to their own file
authorTimmy Willison <timmywillisn@gmail.com>
Mon, 2 Jun 2014 16:39:11 +0000 (12:39 -0400)
committerTimmy Willison <timmywillisn@gmail.com>
Mon, 2 Jun 2014 16:41:24 +0000 (12:41 -0400)
Fixes #15126

Gruntfile.js
src/ajax.js
src/event/ajax.js [new file with mode: 0644]
src/jquery.js

index 73692cbbb76524eb913c5584d9b00693c9a4bd32..b9eb73951e2c5095c94e31b17c16487d3d493a7e 100644 (file)
@@ -38,7 +38,7 @@ module.exports = function( grunt ) {
                                        "selector"
                                ],
                                removeWith: {
-                                       ajax: [ "manipulation/_evalUrl" ],
+                                       ajax: [ "manipulation/_evalUrl", "event/ajax" ],
                                        callbacks: [ "deferred" ],
                                        css: [ "effects", "dimensions", "offset" ]
                                }
index 1b01fd6a5474dcd7717697dbe0290338d712d000..869d0fa4e9dbe2b7f0adb2dbd868b5b560dde412 100644 (file)
@@ -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 (file)
index 0000000..278c403
--- /dev/null
@@ -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 );
+       };
+});
+
+});
index ac5ea9fd7959829f9479f3804ffcb69f741fc236..7c1528b885071427982c06d0aaf725cf51d11ed6 100644 (file)
@@ -23,6 +23,7 @@ define([
        "./ajax/script",
        "./ajax/jsonp",
        "./ajax/load",
+       "./event/ajax",
        "./effects",
        "./effects/animatedSelector",
        "./offset",