Bootstrap just implemented a neat autocomplete feature called typeahead. I am having trouble getting the appropriate value for the text input.
For instance, I might
$('#autocomplete').on('typeahead:selected', function (e, datum) {
console.log(datum);
});
$('#autocomplete').on('typeahead:cursorchanged', function (e, datum) {
console.log(datum);
});
Seems Typeahead changed listeners and usages are not well documented. You can use these listeners.
UPDATE
Event name was changed to typeahead:select in later versions.