fitiskin / jquery-autocompleter

Easy customisable and with localStorage cache support.
https://fitiskin.ru/jquery-autocompleter/
MIT License
176 stars 85 forks source link

Using a remote source - how do I format it? #24

Closed ghost closed 2 years ago

ghost commented 8 years ago

Hi There!

Im trying to use a remote source for autocompleter, but I am unsure what to return? Do I return

  • html content for each result or a JSON array. If i use a JSON array what should I call the array as there is no longer a way to specify the name as the source becomes the path

    Currently the contents of my remote results page looks like this:

    var data = [ { "hex": "#EFDECD", "label": "Almond", "rgb": "(239, 222, 205)" }, { "hex": "#CD9575", "label": "Antique Brass", "rgb": "(205, 149, 117)" }, { "hex": "#FDD9B5", "label": "Apricot", "rgb": "(253, 217, 181)" }, { "hex": "#78DBE2", "label": "Aquamarine", "rgb": "(120, 219, 226)" } };

    Thanks for any help in advance

  • taeraeyttaejae commented 7 years ago

    this project seems quite a lot like it has been abandoned.

    fitiskin commented 2 years ago

    I'm sorry that I abandoned the project. Your example should work out of the box. Also you can use new option named "format" to map values as mentioned here.