0

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?

  • I believe jquery-tokeninput can only take a function that returns a URL as a data soruce param, not one like the above. Do you have access to the autoComplete() function, how much space do you have to rework there? – Chris Aug 22 '13 at 10:54
  • I see. I have another option to implement what I want without using tokeninput, so I'll just do that instead. – user2608171 Aug 22 '13 at 13:30

0 Answers0