Dynamic re-wiring
var typeahead = $('#search').data('typeahead'); if(typeahead) { var orig_show = typeahead.show; typeahead.show = function() { // our code here }; }
var typeahead = $('#search').data('typeahead'); if(typeahead) { var orig_show = typeahead.show; typeahead.show = function() { // our code here }; }