我正在尝试使用 Twitter typeahead.js在选择后返回一个数据。根据我对文档的理解,代码应该类似于
$('.selector').typeahead({
name: 'identifier',
local: localObjectsArray
}).on('autocompleted', function(item){
alert(JSON.stringify(item));
});
但是,这不起作用。检测预输入事件的正确方法是什么?
我正在尝试使用 Twitter typeahead.js在选择后返回一个数据。根据我对文档的理解,代码应该类似于
$('.selector').typeahead({
name: 'identifier',
local: localObjectsArray
}).on('autocompleted', function(item){
alert(JSON.stringify(item));
});
但是,这不起作用。检测预输入事件的正确方法是什么?