jq_typewatch.anubis
693 Bytes
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
/*
* Created by PyramIDE.
* User: フランスのトトロ aka (David RENÉ)
* Date: 11/07/2021
* Time: 00:21
* © David RENÉ
*/
read tools/string.anubis
public define String
watch_options
(
String target_id, //id of the target to insert the result
String ajax_url, //
Int wait,
)
=
"{
callback: function(value) {Xlib.load_content('"+target_id+"', "+ajax_url+")},
wait:"+wait+",
highlight: true,
allowSubmit: false,
captureLength: 0
}"
.
public define String
init_watcher
(
String element,
String target_id,
String ajax_url,
)=
"$('#"+element+"').typeWatch("+watch_options(target_id, ajax_url, 750)+");"
.