I regret to ask this question again. I am trying to implement autocomplete on my site. I have a list in html on the page that contains all the options.
<div id="list"><ul><li>option1</li><li>option2</li><li>option3</li></ul></div>
In my javascript file I have created the array using the list from HTML:
$(function () {
var lst_source = $("#list");
var lst_options = $("li", loc_source);
lst_options.each(function(){
// Creating my array here
});
With this I am trying to enable autocomplete on the text box that identified with the id= “list”.
I have searched much but couldnt understand the implementation so it works. I cannot employ ajax here and can only use local variable.
Please guide me through.
This is from the jqueryUi examples itself:
HTML