Gatting 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
"docs/js" and "docs/css" folders.
If you want to make changes, the uncompiled javascript and sass files are in the sources folder.
<!-- CSS file -->
<link rel="stylesheet" href="path/to/autocomplete.css">
<!-- JS file -->
<script src="path/to/autocomplete.min.js"></script>
<!-- CSS file -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/tomik23/autocomplete@master/docs/css/autocomplete.css"/>
<!-- JS file -->
<script src="https://cdn.jsdelivr.net/gh/tomik23/autocomplete@master/docs/js/autocomplete.min.js"></script>
If you want on older browsers - IE use polyfills
<script>
if (!('Promise' in window)) {
var script = document.createElement('script');
script.src =
'https://polyfill.io/v3/polyfill.min.js?features=Promise%2CElement.prototype.closest';
document.getElementsByTagName('head')[0].appendChild(script);
}
</script>
<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>
<script src="path/to/polyfill.js"></script>