I am trying to set up twitter typeahead in my application.
http://twitter.github.io/typeahead.js/examples/
Howevery, I don't get this thing to work. I have included the js file and have this as my input
<input id="hashtag_search" name="s" type="text" class="form-control typeahead tt-query tt-hint" placeholder="#hashtag" autocomplete="off" dir="auto">
and this as my JS:
$("#hashtag_search").typeahead({
name: 's',
local: ['timtrueman', 'JakeHarding', 'vskarich']
});
Can anyone help? Would be great.
Thanks!
EDIT: Now I am getting this as an output:
it didn't work for me either until i put your JS inside $(document).ready(); block
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.