Twitter Bootstrap typeahead.js with underscore.js Templating – A Tutorial

In a previous post, I described how to use the Twitter Bootstrap Typeahead component. The Twitter Bootstrap team recently announced however that they would be switching to Twitter’s typeahead.js for the next major release. That sounds pretty great to me.  typeahead.js is much more powerful than the current Twitter Bootstrap typehead component. Fortunately, since typeahead.js is already available, you don’t have to wait for Twitter Bootstrap v3 to start using it. Using typeahead.js with Twitter Bootstrap isn’t very well documented just yet.  As well, there is no documentation to be found on how to use Underscore.js templates with typeahead.js, so I thought I’d help you along here. Continue reading