Remember that you can refer to a specific instance of the widget created by the jQuery UI factory ( _create ) method using data :
var widgetInst = $("#global-search").autocomplete({}).data('ui-autocomplete');
... or, since jQuery UI 1.12, through instance () a helper method:
var widgetInst = $("#global-search").autocomplete('instance');
So you can override your methods with yours:
widgetInst._renderMenu = function(ul, items) { var self = this; ul.append('<table class="ac-search-table"></table>'); $.each( items, function( index, item ) { self._renderItem( ul.find("table"), item ); }); };
source share