Reputation: 965
I'm trying to extend ui.autocomplete by using widget factory:
$.widget( "custom.myautocomplete", $.ui.autocomplete, {
_renderItem: function( ul, item ) {
return $( "<li>" )
.text(item.label)
.appendTo( ul );
}
});
$(function() {
$("#inp").myautocomplete({
minLength: 1,
source: ["One","Two","Three","Four","Five"]
})
});
Searching works fine, but item selection does not work.
Upvotes: 0
Views: 205
Reputation: 7736
Try using a later version of jquery. It works for me with 1.10 and 1.11
code unchanged
http://jsfiddle.net/L5uu393y/7/
Upvotes: 1