- Load JQuery and fuzzy-autocomplete.js in header
- Define your input element:
<input id='sample-input'>
- Call fuzzy-autocomplete library
- Load with native array:
fuzzyAutocomplete($('#sample-input'), ['data1', 'data2', 'data3']);
- Load json array with ajax:
fuzzyAutocomplete($('#sample-input'), '/path/to/file.json');
- See
sample.html
for working demonstration
- Implement up and down navigation with keyboard
- Implement vanilla JS version to get rid of jQuery dependency