jQuery autocomplete example

http://stackoverflow.com/questions/28193600

by adamovic

HTML

<div class="ui-widget">
<label for="tags">Search: </label>
<input id="tags">
</div>

JavaScript

$(function() {
var availableTags = [
"john",
"john2",
"iohn3",
"john4",
"john white",
"johnny"
];
$( "#tags" ).autocomplete({
source: availableTags, 
autoFocus: true
});
});