https://github.com/gmurayama/autocomplete-vanillajs
Lightweight dropdown list with autocomplete built only with Vanilla JavaScript
https://github.com/gmurayama/autocomplete-vanillajs
autocomplete javascript vanilla-js
Last synced: about 1 month ago
JSON representation
Lightweight dropdown list with autocomplete built only with Vanilla JavaScript
- Host: GitHub
- URL: https://github.com/gmurayama/autocomplete-vanillajs
- Owner: gmurayama
- License: unlicense
- Created: 2018-04-25T19:11:01.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-21T14:01:31.000Z (about 6 years ago)
- Last Synced: 2025-01-26T10:31:08.571Z (3 months ago)
- Topics: autocomplete, javascript, vanilla-js
- Language: JavaScript
- Size: 16.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AutoComplete VanillaJS
Dropdown list with autocomplete function made only with Vanilla JavaScript.

## Getting Started
### Installing
* Download both autocomplete.js and autocomplete.css and import them to your HTML page.
* That's it!### Usage
Instanciate a new AutoComplete variable and pass the DOM Element as parameter
```
var autoComplete = new AutoComplete(element);
```The `data-attributes` availables are:
* `data-autocomplete` (optional) - if set to false, disable the dropdown.
* `data-autocomplete-source` - URL to make a HTTP Request.
* `data-autocomplete-postvar-name` (optional) - Rename the POST variable name to be sent to the server.
* `data-autocomplete-minlength` (optional) - Input value minimum length to make a HTTP Request. Default value is 3.Use `autoComplete.getSuggestionList()` to start the autocomplete.
## License
This project is licensed under the *The Unlicense* License - see the [LICENSE](https://github.com/gmurayama/autocomplete-vanillajs/blob/master/LICENSE) file for details