Can I replace a method on a jQuery UI object? How?
- by Cheeso
If I want to tweak some of the capability of a jQuery UI object, by replacing one of the functions, how would I go about doing that?
Example: suppose I wanted to modify the way the jQuery autocomplete widget rendered the suggestions. There's a method on the autocomplete object that looks like this:
_renderItem: function( ul, item) {
return $( "<li></li>" )
.data( "item.autocomplete", item )
.append( "<a>" + item.label + "</a>" )
.appendTo( ul );
},
Could I replace this? How? What syntax would I use?