scratch – Diff between revs 58 and 125
?pathlinks?
Rev 58 | Rev 125 | |||
---|---|---|---|---|
Line 1... | Line 1... | |||
1 | define( [ |
1 | define([ |
|
2 | "../core", |
2 | "../core", |
|
3 | "../event" |
3 | "../event" |
|
4 | ], function( jQuery ) { |
4 | ], function( jQuery ) { |
|
Line 5... | Line -... | |||
5 | |
- | ||
6 | "use strict"; |
- | ||
7 | |
5 | |
|
8 | // Attach a bunch of functions for handling common AJAX events |
- | ||
9 | jQuery.each( [ |
- | ||
10 | "ajaxStart", |
- | ||
11 | "ajaxStop", |
- | ||
12 | "ajaxComplete", |
- | ||
13 | "ajaxError", |
- | ||
14 | "ajaxSuccess", |
- | ||
15 | "ajaxSend" |
6 | // Attach a bunch of functions for handling common AJAX events |
|
16 | ], function( i, type ) { |
7 | jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) { |
|
17 | jQuery.fn[ type ] = function( fn ) { |
8 | jQuery.fn[ type ] = function( fn ) { |
|
18 | return this.on( type, fn ); |
9 | return this.on( type, fn ); |
|
19 | }; |
10 | }; |
|
Line 20... | Line 11... | |||
20 | } ); |
11 | }); |