Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does twitter bootstrap typeahead supports remote data source?

Does typeahead feature support remote data source in version 2.0.3 of twitter-bootstrap?

The link to typehead functionality http://twitter.github.com/bootstrap/javascript.html#typeahead

like image 504
Nambi Avatar asked Oct 08 '22 18:10

Nambi


1 Answers

Did you try:

$('.typeahead').typeahead({
    source: function (query, typeahead) {
        return $.post('/typeahead', { query: query }, function (data) {
            return typeahead.process(data);
        });
    }
});
like image 73
HaNdTriX Avatar answered Oct 10 '22 09:10

HaNdTriX