Trigger load on autocomplete suggestion selection

Viewed 78

I have an autocomplete form that gives a suggestion for something the user may be looking for for example if I were to type "ca" it would give a suggestion for "car", "cat", "canon" and so on. Right now I can either have the data change as I'm typing (but that takes away from having the autocomplete) using

.on('input', function() {
});

or on change but that requires the user to either click enter or click outside of the text box.

.on('change', function() {
});

Is there a way to have the data load when the user selects the autocomplete suggestion rather than clicking outside the box or while typing? I've looked everywhere and can't find a thing on this. Thank you in advance.

1 Answers
Related