Let's suppose I want to change the render function in bootstrap-typeahead library. http://twitter.github.com/bootstrap/assets/js/bootstrap-typeahead.js
One way to active this goal is to make:
_.extend($.fn.typeahead.Constructor.prototype, {
render: function (items) {
// some code
}
});
Let's suppose I want to redefine the render function just for a specific element like…</p>
element.typeahead({
minLength: 3,
source: getSource
});
How should I redefine the render function in order to be valid just for this element?
P.S.:
I am using jquery and underscore