How can I use the autocomplete plugin on an input field depending on the 5 first characters typed dynamically. for exemple i have typed :
12345
And I get :
12345 New York.
What i tried is :
var availableTags = [
"12345 New Yord",
"12378 Paris",
"45687 Barcelon"
];
$( "#tags" ).autocomplete({
source: availableTags,
minLength: 5
});
The problem is : I have to complete the available tags depending on the first 5 charachters using a function