javascript - twitter typeahead with headers for the suggestions, how? -


i followed this tutorial , implemented twitter typeahead ajax source (django backend) recommendations drop down box.

i can dropdown give me suggestions based on enter i'd able have headers organize various suggestions such in example:

enter image description here

from site: http://twitter.github.io/typeahead.js/examples/

the problem examples on site non of them use ajax source. tried modifying typeahead call this

$(".typeahead").typeahead({     source: function ( query, process ) {//ajax call stuff here...},     updater: function(item) {//stuff goes here...},     header: '<h3>header should here</h3>', //<-- should add header suggestions, no?     } 

but suggestions list doesn't header..

is @ possible have such auto recommendations done via ajax data source header labels different types of suggestions?

looking @ typeahead javascript source bootstrap project, seems doesn't implement 'header' option.

clearly, version demonstrated @ http://twitter.github.io/typeahead.js/examples/ does implement header. added on march 24 (see https://github.com/twitter/typeahead.js/blob/master/changelog.md#090-march-24-2013), latest bootstrap hasn't incorporated feature yet.

you customize bootstrap js file (here: http://twitter.github.io/bootstrap/customize.html) exclude bootstrap's latest typeahead plugin , include more advanced javascript @ http://twitter.github.io/typeahead.js/releases/latest/typeahead.js, can use instead.

hope helps!


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -