twitter-bootstrap-3 – Bootstrap tagsinput typeahead不工作

我有这个使用bootstrap-tagsinputs插件的输入,问题是我想要它自动完成标签,而不是这样做!

标签部分工作完美;)但自动完成部分不

任何人都有一个想法为什么?,这些示例与插件页面中的示例相同:

http://timschlechter.github.io/bootstrap-tagsinput/examples/

这是我的代码

<input id="tags-text-input"></input>

$("#tags-text-input").ready(function () {
            $("#tags-text-input").tagsinput();
            $("#tags-text-input").typeahead({
                typeahead: ["I'm done trying...","Jhon","Smith"]
            });
        });

我已经包含了typeahead插件和tagsinput插件.我做错了什么?

提前致谢.

解决方法

我想你需要在标签输入中设置类型头像,如下所示:
<input id="tags-text-input"></input>
$("#tags-text-input").ready(function () {
    $("#tags-text-input").tagsinput({
        typeahead: {
            source: ["I'm done trying...","Smith"]
        }
    });
});

相关文章

Bootstrip HTML 查询搜索常用格式模版 &lt;form class=&...
如何在按钮上加红色数字 您可以使用Bootstrap的badge组件来在...
要让两个按钮左右排列,你可以使用 Bootstrap 的网格系统将它...
是的,可以将status设置为布尔类型,这样可以在前端使用复选...
前端工程师一般用的是Bootstrap的框架而不是样式,样式一般自...
起步导入:<linkrel="stylesheet"href="b...