The question is a bit old, but just in case anyone needs an answer:

Bootstrap typeahead expects all data to come from the same place - so if 
you have data-provide="typeahead", you also have to specify 
data-source="[...]" and any other options you need. In case you want to 
activate the typeahead in Javascript, just lose the 
'data-provide="typeahead"' and it should work.

26 февруари 2012, неделя, 13:02:05 UTC+2, Anuar Balgimbayev написа:
>
> hello guys!
> bootstrap's typeahead doesn't work in my hands. 
>
> <script type="text/javascript" 
> src="/bootstrap/js/bootstrap-typeahead.js"></script> (from git)
>
> <script type="text/javascript">
>             var mas = ['Red', 'Green', 'Blue];
>             
>             $('.typeahead').typeahead({
>                  source: mas
>             })
> </script>
>
> <td>
>   <div>
>        <input type="text" name="searchWord" style="width: 130px" 
> placeholder="search" data-provide="typeahead"  />
>   </div>
> </td>
>
> what i'm doing wrong?
> thanks for any suggestions
>
>

Reply via email to