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 p
$(\"body\").on()
var fx = { "init":function() { $("#id_of_an_element").typeahead({ minLength:2, delay:1 ... }) }, "method2":function(){ some content; } }
Every time the element containing the typeahead is loaded into the DOM (eg. via AJAX success, call fx.init();