Я пытаюсь установить элемент typeahead
для поиска по почтовому индексу.
Вот мой JS код:
var path = 'https://mytestroute.dev/_getzipcodes';
$('#cust_postal_code').typeahead(null,{
hint: true,
highlight: true,
source: function (query, process) {
return $.get(path, { query: query }, function (data) {
return process(data);
});
},
name: 'zipcode',
display: 'zipcode',
});
Каждый раз, когда я печатаю, поиск срабатывает, и я получил ответ:

Но по неизвестной причине подсказки результата не отображаются.