Bootstrap   发布时间:2022-04-18  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了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"]
        }
    });
});

大佬总结

以上是大佬教程为你收集整理的twitter-bootstrap-3 – Bootstrap tagsinput typeahead不工作全部内容,希望文章能够帮你解决twitter-bootstrap-3 – Bootstrap tagsinput typeahead不工作所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。