My problem is I am using type ahead for my top search it work but only one time ajax call in key press but I have call every time when I press key my code is below
$.typeahead({
input: '.js-typeahead-car_v1',
maxItem: 100,
order: "asc",
hint: true,
source: {
searchkey: {
url: {
type: "POST",
url: "/search",
data: {
myKey: "muvalue"
}
}
}
},
callback: {
onClick: function (node, a, item, event) {
$("#topsearchbtn").trigger( "click" );
},
onSubmit: function (node, form, item, event) {
$("#topsearchbtn").trigger( "click" );
}
}
});