Is there a way to convert twitter bootstrap’s typeahead function into a $("body").on() function? The following code works fine if the element exists on the page load.
$("#job_title").typeahead({
source: searchFunction,
onselect: function(obj) {
}
});
But if I add the text input with id="job_title" dynamically, the above function doesn’t work. Is there a workaround for this?
I downloaded jquery.livequery.js to get the behavior I wanted: