I'm currently using jQuery autocomplete, but I would like to use token input instead.
Here is my current jQuery autocomplete code:
$("#my-text-input").autocomplete({
source: function (request, response) {
hub.server.autoComplete(request.term).done(function (suggestionsJson) {
response(JSON.parse(suggestionsJson));
})
}
});
In the tokenInput documentation it says I should use something like:
$("#my-text-input").tokenInput("/url/to/your/script/");
I am, however, using a function instead of an url in my current code and I need to do the same with tokenInput. How can I do this?