Is there a way to convert a function like twart bootstrap to a function $ ("body"). on ()? The following code works fine if the element exists when the page loads.
$("#job_title").typeahead({
source: searchFunction,
onselect: function(obj) {
}
});
But if I add text input with id = "job_title" dynamically, the above function does not work. Is there a workaround for this?
source
share