Bootstrap 3 RC 1中的typeahead JavaScript模块在哪里?

ncu*_*ica 76 jquery twitter-bootstrap twitter-bootstrap-3

如你所知,Bootstrap RC 1就在这里,我一直在阅读这个新框架中所有新的强大功能.但是猜猜是什么,typehead不在文档中.有谁知道这是出于任何原因吗?

我在google搜索时发现了这些例子,并且我在这篇文章中读到他们改变了类型头Bootstrap.所以我必须手动添加它还是在Bootstrap 3包中?

有谁知道这件事?

cee*_*yoz 67

我相信它已被弃用,支持Twitter的优秀typeahead.js.他们的文档有一个Bootstrap集成部分应该有所帮助.

编辑: Twitter已删除集成说明.目前尚不清楚这是否是Bootstrap 3.0兼容版本之前的临时版本,或者它是否已经过时,但@drye链接到http://www.aureliomerenda.com/install-typeahead-bootstrap-3- fix-css-overlay-width-100 /.

  • 这里是官方弃用通知:http://getbootstrap.com/getting-started/#migration-notes (3认同)
  • **警告**:截至2013年10月24日,typeahead.js已陈旧3-4个月.希望他们能再次开始.https://github.com/twitter/typeahead.js/issues/489 (3认同)
  • @JakeHarding将于1月初发布新版本. (3认同)
  • *链接到迁移说明已更新*:http://getbootstrap.com/migration (2认同)

Zim*_*Zim 14

现在已经发布了最终的Bootstrap 3.0.0,正式删除了typeahead.但是,Twitter的Typeahead(https://github.com/twitter/typeahead.js)可以在它的位置使用:

Bootstrap 3 Typeahead示例:http://bootply.com/86571


Dan*_* W. 9

正如ceejayoz已经说过的那样,你需要使用typeahead.js +附加的CSS来与Bootstrap集成.

这是为Bootstrap 2制作的.

如果您希望它与Bootstrap 3一起使用,则必须更改.tt-hint类.我改变它是display: none;因为它重叠非常可怕.

我还注意到Button插件(对于输入)不能很好地工作,因为输入也没有被正确覆盖.


Nuk*_*key 9

我找到了适应[2014年5月];)

对于像我一样从谷歌登陆这里的其他人,仍然在寻找正确的答案:https: //github.com/bassjobsen/Bootstrap-3-Typeahead

如果你需要像我一样使用淘汰赛3,我将天才Niemeyer(/sf/answers/1435222141/)的代码改编为最低限度再次使用:

<input type="text" data-bind="value: value, typeahead: {source: your_array}" />
Run Code Online (Sandbox Code Playgroud)


小智 7

是的,在Bootstrap 3中不推荐使用typeahead.

但是typeahead.js还没有为Bootstrap 3做好准备.

工作解决方案是添加额外的css,修复css问题:https: //github.com/jharding/typeahead.js-bootstrap.css

  • 作品.我使用tagManager,typeahead,bootstrap 3.另外使用来自Nick P的.twitter-typeahead .tt-hint css类答案http://stackoverflow.com/questions/18059161/css-issue-on-twitter-typeahead-with-bootstrap -3 (3认同)