Focus on a jQuery autocomplete result (not necessarily the first)
I am struggling to extend jQuery autocomplete so that a particular item has focus by default. The out-of-the-box functionality works pretty well, but it's not perfect. Using the autoFocus option I can automatically focus on the first item. $( "#input" ).autocomplete({ source: "autocomplete.php", minLength: 1, autoFocus: true }); However, I would like to have more control over which item is focused. If the user types in "eng" and the relevant items that my source returns are: American English British English English Scots English I would like the third item, English , to be in focus by default