如何将typeahead.js与bootstrap 3一起使用?

Vih*_*ung 4 typeahead twitter-bootstrap-3

我正在整理一个原型应用程序进行演示,并使用Twitter Bootstrap 3(http://getbootstrap.com - 特别是3.1.1版).我想使用typeahead.js(http://twitter.github.io/typeahead.js/ - 当前版本0.10.1)来推动搜索建议.

我已经看到了以前版本的一些示例,但没有一个与最新版本相关.

将两者融为一体的最佳方法是什么?

基于我见过的几个例子,这就是我想要做的

<input type="text" class="typeahead form-control input-sm" id="searchField1"/>
Run Code Online (Sandbox Code Playgroud)

然后

$(document).ready(function() {
  $('#searchField1').typeahead({
    name: 'keywords',
    local: ['foo', 'bar']
  });
});
Run Code Online (Sandbox Code Playgroud)

但是,我认为事情已经发生了变化

Mo.*_*Mo. 5

twitter.github.io/typeahead.js自举3不兼容.

您可以使用与twitter bootstrap 3兼容的Typeahead

https://github.com/bassjobsen/Bootstrap-3-Typeahead

实际上开发人员将bootstrap 2代码迁移到bootstrap 3这里是详细信息http://bassjobsen.weblogs.fm/migrate-your-templates-from-twitter-bootstrap-2-x-to-twitter-bootstrap-3/