you should use “updater“:
$('#search-box').typeahead({
source: ["foo", "bar"],
updater:function (item) {
//item = selected item
//do your stuff.
//dont forget to return the item to reflect them into input
return item;
}
});
More Related Contents:
- How to get the selected date value while using Bootstrap Datepicker?
- jQuery ui datepicker conflict with bootstrap datepicker
- how to close a bootstrap modal with the browser back button instead of going back a page?`
- anchor click doesn’t open the modal
- jQuery Event : Detect changes to the html/text of a div
- twitter bootstrap typeahead ajax example
- $(window).width() not the same as media query
- jQuery Drag And Drop Using Live Events
- jQuery UI Autocomplete use startsWith
- How do I bind Twitter Bootstrap tooltips to dynamically created elements?
- How to set selected value on select using selectpicker plugin from bootstrap
- Jquery Datepicker Chrome
- jQuery UI Dialog window loaded within AJAX style jQuery UI Tabs
- Disable specific days of the week on jQuery UI datepicker [duplicate]
- Bootstrap throws Uncaught Error: Bootstrap’s JavaScript requires jQuery [closed]
- jQuery UI Datepicker – Disable specific days
- jquery ui dialog box need to return value, when user presses button, but not working
- What does autocomplete request/server response look like?
- Limit bootstrap-datepicker to weekdays only?
- Changing minDate and maxDate on the fly using jQuery DatePicker
- Getting value from JQUERY datepicker
- Apply CSS to jQuery Dialog Buttons
- Implementing jQuery DatePicker in Bootstrap modal
- JQuery UI Datepicker, reverse the order of the year in the dropdowns
- changing location.hash with jquery ui tabs
- How to trigger jquery Resizable resize programmatically?
- PreventDefault alternative for IE8
- Adding jQueryui Buttons to dynamically added content
- jQuery UI – Droppable only accept one draggable
- Twitter Bootstrap Carousel cycle items right to left ( RTL ) reversed