I am trying to have a custom updater function with Bootstrap 2.3.2. The updater function doesn't seem to be called for some reason.
HTML
<input id="options_select" type="text" class="options"/><br/>
<textarea id="options_all" rows="5"></textarea><br/>
SCRIPT
$(document).ready(function() {
var source = [
{ id: 1, name: 'Courses' },
{ id: 2, name: 'Finance' },
{ id: 3, name: 'Housing' },
{ id: 4, name: 'Jobs' },
{ id: 5, name: 'Lifestyle' },
{ id: 6, name: 'Travel' },
{ id: 7, name: 'Miscellaneous' },];
$('#options_select').typeahead({
source: source,
updater: function(item) {
alert('hi');
return item;
}
});
});
The typeahead is working fine, but why isn't the alert showing up?