簡體   English   中英

Bootstrap Twitter Typeahead設置不起作用

[英]Bootstrap Twitter typeahead setup not working

我正在嘗試在我的應用程序中提前設置twitter。

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'] 


});

有人可以幫忙嗎? 會很好。

謝謝!

編輯:現在我將其作為輸出:

在此處輸入圖片說明

在我將您的JS放入$(document).ready();之前,它對我都不起作用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM