I have a jQuery autocomplete field that's been working fine up until now. I decided to use _renderItem
on it because I wanted to use some HTML in the results. Here's my code:
function prepareClientField() {
var renderItemFunction = function(ul, item) {
return $("<li></li>")
.data("item.autocomplete", item)
.append(item.label)
.appendTo(ul);
};
$("#client_name").autocomplete({
source: clientNames,
delay: 0
}).data("autocomplete")._renderItem = renderItemFunction;
$("#client_name").focus();
}
For reason, now, I can't use the up/down arrows in my autocomplete field. I can't even use the mouse to click an item in the results. Is there something else I need to do to make this actually work?