gpt4 book ai didi

javascript - Bootstrap Twitter typeahead 设置不起作用

转载 作者:行者123 更新时间:2023-11-30 10:21:49 25 4
gpt4 key购买 nike

我正在尝试在我的应用程序中设置 Twitter typeahead。

http://twitter.github.io/typeahead.js/examples/

但是,我没有让这个东西工作。我已经包含了 js 文件并将其作为我的输入

<input id="hashtag_search" name="s" type="text" class="form-control typeahead tt-query tt-hint" placeholder="#hashtag" autocomplete="off" dir="auto">

这是我的 JS:

$("#hashtag_search").typeahead({    


name: 's',
local: ['timtrueman', 'JakeHarding', 'vskarich']


});

有人可以帮忙吗?会很棒。

谢谢!

编辑:现在我得到这个作为输出:

enter image description here

最佳答案

在我将您的 JS 放入 $(document).ready() 之前,它对我也不起作用; block

关于javascript - Bootstrap Twitter typeahead 设置不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21248388/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com