I am adding the autocomplete functionality to text box. Referring this jQuery autocomplete custom data plugin.
Without custom data code it is working fine. I have added following custom data code
.autocomplete( "instance" )._renderItem = function( ul, item ) {
return $( "<li>" )
.append( "<a>" + item.label + "<br>" + item.desc + "</a>" )
.appendTo( ul );
};
it throws error as
no such method 'instance' for autocomplete widget instance
is there anything that I am missing.
I am using jQuery v1.11.2 and jQuery UI - v1.10.3
.data("ui-autocomplete")
for me – Chainman