Getting started
Include JS and CSS files
The first thing you should do is download the
autocomplete
library files. All the necessary files are located in the
"dist/js" and "dist/css" folders. If you want to make changes, the
uncompiled javascript and sass files are in the sources folder.
<!-- css -->
<link rel="stylesheet" href="path/to/autocomplete.min.css">
<!-- js -->
<script src="path/to/autocomplete.min.js"></script>
<!-- css -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/tomickigrzegorz/autocomplete@2.0.2/dist/css/autocomplete.min.css"/>
<!-- js -->
<script src="https://cdn.jsdelivr.net/gh/tomickigrzegorz/autocomplete@2.0.2/dist/js/autocomplete.min.js"></script>
If you want to use the library in older browsers like IE
-- use local files from dist --
<!-- css -->
<link rel="stylesheet" href="path/to/autocomplete.ie.min.css">
<!-- js -->
<script src="path/to/js/polyfill.js"></script>
<script src="path/to/js/autocomplete.ie.min.js"></script>
-- use cdn --
<!-- css -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/tomickigrzegorz/autocomplete@2.0.2/dist/css/autocomplete.ie.min.css">
<!-- js -->
<script src="https://cdn.jsdelivr.net/gh/tomickigrzegorz/autocomplete@2.0.2/dist/js/polyfill.js"></script>
<script src="https://cdn.jsdelivr.net/gh/tomickigrzegorz/autocomplete@2.0.2/dist/js/autocomplete.ie.min.js"></script>
-- use cdn polyfills from npm --
<!-- js -->
<script src="https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/element-closest@3.0.2/browser.min.js"></script>
in the docs folder you have an example using the IE library - ie.html