Trigger jQuery Autocomplete manually
You can use the following script to toggle the autocomplete manually:
var textbox = $('input#mainSearchBox');var autocompleteBox = textbox.autocomplete('widget');// toggle the autocomplete widgetautocompleteBox.is(':hidden') ? textbox.autocomplete('search', textbox.val()).focus() : autocompleteBox.hide();
This code can be found in the source of the combobox example on the jquery autocomplete demo site (lines 127-141).
For https://github.com/devbridge/jQuery-Autocomplete, you can use:
$('input#mainSearchBox').autocomplete("getSuggestions", $('input#mainSearchBox').val())