尝试使用 tagsinput & typeahead 时,我不断收到此错误。
html:
<section id="examples">
<div class="example example_typeahead">
<h3>Typeahead</h3>
<div class="bs-example">
<input class="testing" type="text" value="nope" />
</div>
</div>
</section>
javascript:
var data = ['yes', 'yesyes', 'no', 'nope', 'yes again'],
elt = $('.testing');
elt.tagsinput({
typeahead: {
source: data
},
});
单击列表中的项目后,我收到应用错误。我还注意到我输入的文本没有被删除。我已经搜索了其他类似的问题,但没有找到有效的答案。
注意:我将这个插件用于预先输入https://github.com/bassjobsen/Bootstrap-3-Typeahead 和这个插件用于标签输入http://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/