我在尝试使用 Tokenfield 进行 Bootstrap 时遇到以下错误:
Uncaught TypeError: undefined is not a function
有人知道如何解决这个问题吗?错误发生在(大约第 180 行):
this.$input.autocomplete(r)
this.$input
指向包含输入字段的数组,但 this.$input.autocomplete
未定义(从 Chrome 控制台调试时)。
我尝试添加 noconflict (如讨论的 here ),但这不起作用。
这是经过处理的 html:
<div class="tokenfield form-control" style="width: 100%;">
<input id="hident15" name="f14" type="text" required="" value="" class="form-control" tabindex="-1" style="position: absolute; left: -10000px;">
<input type="text" tabindex="-1" style="position: absolute; left: -10000px;">
<input type="text" class="token-input" autocomplete="off" placeholder="" id="hident15-tokenfield" tabindex="0" style="min-width: 60px; width: 333px;">
</div>
最佳答案
事实证明 jQuery UI 也是一个依赖项。从文档中来看这一点并不明显。
关于javascript - Bootstrap 错误的 Tokenfield,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29583253/