I am implementing jQuery AutoComplete plugin like this:
HTML:
<input type='text' class='AutoComplete' url='/source/data'>
jQuery:
$( ".AutoComplete" ).autocomplete({
source: "/source/data"
});
Above code is working. Now I want that source part of Autocomplete option should be fetched from input’s url attribute (url='/source/data').
How is it possible ?
Thanks
You need to call the autocomplete() function (to set up the source), separately for each textbox.
This works with this HTML:
To specify the URL in the element markup, I recommend using an attribute like
data-???, which complies with the HTML5 standard.