不能在我的小提琴上打字

Unable to get typeahead working in my fiddle

本文关键字:小提琴 我的 不能      更新时间:2023-09-26

我只是在我的小提琴中实现Twitter的typeahead插件。然而,我得到一个错误:

Uncaught TypeError: undefined is not a function

这个错误是在我提到ttAdapter()的那一行。但是我看到ttAdapter()已经在插件中提到了。

jsFiddle

我错过了什么?

您错过了Bloodhound建议集成,必须使用.initialize()实例化。

http://jsfiddle.net/Ca4rq/2/应该是你所追求的。改编自https://twitter.github.io/typeahead.js/examples/