From d42c8b528eb595101954f478e0024e3f079f6fbf Mon Sep 17 00:00:00 2001 From: schneefux Date: Wed, 22 Mar 2017 19:19:26 +0100 Subject: first implementation of fun stats site --- templates/assets/jquery/src/event/ajax.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 templates/assets/jquery/src/event/ajax.js (limited to 'templates/assets/jquery/src/event/ajax.js') diff --git a/templates/assets/jquery/src/event/ajax.js b/templates/assets/jquery/src/event/ajax.js new file mode 100644 index 0000000..98e194b --- /dev/null +++ b/templates/assets/jquery/src/event/ajax.js @@ -0,0 +1,20 @@ +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 ); + }; +} ); + +} ); -- cgit v1.3.1