gauthiier 46a0cc8c0b www
2019-12-08 21:42:16 +01:00

31 lines
697 B
JavaScript

// https://goodies.pixabay.com/jquery/tag-editor/demo.html
$.get("/tags", function(data, status){
$('#tags').tagEditor({
autocomplete: {
delay: 0, // show suggestions immediately
position: { collision: 'flip' }, // automatic menu position up/down
source: data.result
},
maxLength: 25,
placeholder: 'Enter tags ...'
});
});
$.get("/report", function(data, status){
$('#report').text(data.report);
});
$('#collect').submit(function(e) {
e.preventDefault();
args = $(this).serialize();
$.get('/collect?'+ args, function(data) {
console.log(data);
$('#serv').append(data.msg + "<br>");
$('#report').text(data.report);
});
});