You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| event.ajaxOptions | object | options that are passed to [$.ajax method](http://api.jquery.com/jquery.ajax/)|
26
27
27
-
Using this event it is possible to change the requested url. This can be useful to append an arbitrary parameter to the requested url so the server can handle the request differently. For example to optimize the returned url by stripping everything outside the container element (header, footer, etc.). Because it is used as the settings object in $.get, you can also use this for more exotic configuration.
28
+
Using this event it is possible to change the requested url. This can be useful to append an arbitrary parameter to the requested url so the server can handle the request differently. For example to optimize the returned url by stripping everything outside the container element (header, footer, etc.).
28
29
29
30
```javascript
30
31
ias.on('load', function(event) {
31
32
event.url=event.url+"?ajax=1";
33
+
32
34
// alternatively...
33
-
event.data= { ajax:1 };
35
+
event.ajaxOptions.data= { ajax:1 };
36
+
})
37
+
```
38
+
39
+
The ajaxOptions property can also be used for more exotic configurations.
34
40
35
-
// And as a more exotic example, timeout and HTTP auth
41
+
```javascript
42
+
ias.on('load', function(event) {
43
+
// A more exotic example, timeout and HTTP auth
36
44
event.timeout=7000; //ms
37
45
event.username='shirley';
38
46
event.password='temple';
39
47
})
40
48
```
41
49
50
+
See http://api.jquery.com/jquery.ajax/ for a complete list of options.
0 commit comments