Hello!
Is it possible to add autocomplete feature to input field with data loaded from local storage?
<input type="text" id="medicine" />
<script type="text/javascript">
$(document).ready(function($){
var medicine = localStorage.getItem('medicine');
console.log(medicine);
$('#medicine').autocomplete({source:medicine, minLength:2});
});
</script>
I know thta 'source' requires an url, I succeded to make autocomplete with data from mysql. But this takes longer time, and I thought to load data once in local storage, then use them for autocomplete.