我已經將Bootstrap 2更新爲Bootstrap 3,最大的問題是typeahead已被刪除,建議使用typeahead.js。所以我安裝了它,並預輸入工作容易使用沒有問題,但我也使用其他功能,如:使用typeahead.jsBootstrap 3 typeahead.js,使用Bootstrap 2中的類似函數
$('#my_field').typeahead({
source : [list_of_items],
matcher: function(item) {
foo();
return item;
},
updater : function(item) {
foo2();
return item;
},
closed: function(item) {
...
},
autocompleted: function(item) {
...
}
});
我怎樣才能實現的功能相似?
在https://github.com/twitter/typeahead.js像
typeahead:initialized, typeahead:opened, typeahead:closed
一些功能,但也有關於如何使用它們
謝謝,其實我決定用「老」插件 – felipep