【发布时间】:2013-08-03 21:17:18
【问题描述】:
我正在尝试使用 Twitter typeahead.js 在选择后返回一个数据。根据我对文档的理解,代码应该类似于
$('.selector').typeahead({
name: 'identifier',
local: localObjectsArray
}).on('autocompleted', function(item){
alert(JSON.stringify(item));
});
但是这不起作用。检测 typeahead 事件的正确方法是什么?
【问题讨论】: