mentions: {
source: function (query, process, delimiter) {
// Do your ajax call
// When using multiple delimiters you can alter the query depending on the delimiter used
if (delimiter === '@') {
$.getJSON(baseurl+'mentions.json', function (data) {
//call process to show the result
process(data);
});
}
}
}
No errors in console but, when pressing "@", i got an empty popup..
Any ideas?
PS: When loading items with source (without using $.getSON for external file) everything works fine.
I tried to put the same source of demo in an external file:
mentions.json
code:
then fetch it like suggested:
code:
No errors in console but, when pressing
"@"
, i got an empty popup.. Any ideas?PS: When loading items with
source
(without using $.getSON for external file) everything works fine.