Question

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:

enter image description here

Was it helpful?

Solution

it didn't work for me either until i put your JS inside $(document).ready(); block

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top