How can I use typeahead.js with bootstrap 3? -


i putting prototype application demonstration, , using twitter bootstrap 3 (http://getbootstrap.com - version 3.1.1). use typeahead.js (http://twitter.github.io/typeahead.js/ - version 0.10.1) drive search suggestions.

i have seen few examples previous versions, none seem relevant latest versions.

what best way integrate two?

based on few examples have seen, trying do

<input type="text" class="typeahead form-control input-sm" id="searchfield1"/> 

and then

$(document).ready(function() {   $('#searchfield1').typeahead({     name: 'keywords',     local: ['foo', 'bar']   }); }); 

however, think things have moved on

the twitter.github.io/typeahead.js not compatible bootstrap 3.

you can use typeahead compatible twitter bootstrap 3

https://github.com/bassjobsen/bootstrap-3-typeahead

actually developer migrated bootstrap 2 code in bootstrap 3 here details http://bassjobsen.weblogs.fm/migrate-your-templates-from-twitter-bootstrap-2-x-to-twitter-bootstrap-3/


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -