-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdefault.js
44 lines (43 loc) · 903 Bytes
/
default.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
$(function() {
$.ajaxPrefilter(function( options, originalOptions, jqXHR ) {
if (options.target) {
$(options.target).text(options.url);
jqXHR.abort();
}
});
$.ajax({
url: '/foo{?query,number}',
tokens: {query:'person', number: '1234'},
target: '.result1'
});
$.ajax({
url: '/foo{?query,number}',
tokens: {number: '1234'},
target: '.result2'
});
$.ajax({
url: '/map?{x,y}',
tokens: {x: '123', y: '987'},
target: '.result3'
});
$.ajax({
url: '/map?{x,y}',
tokens: {x: '123'},
target: '.result4'
});
$.ajax({
url: '/foo?fixed=yes{&x}',
tokens: {x: '123'},
target: '.result5'
});
$.ajax({
url: '/foo{?list}',
tokens: {list: [ "red", "green", "blue" ] },
target: '.result6'
});
$.ajax({
url: '/foo{?list*}',
tokens: {list: [ "red", "green", "blue" ] },
target: '.result7'
});
});