Set the auto complete:
$("#searchBox").autocomplete({
source: queryDB
});
The source function that gets the data:
function queryDB(request, response) {
var query = request.term;
var data = getDataFromDB(query);
response(data); //puts the results on the UI
}