I have a jQuery autocomplete field that still works. I decided to use _renderItem because I wanted to use some HTML in the results. Here is 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 the reason, now, I cannot 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 anything else I need to do to make this really work?
jquery autocomplete
Jason Swett Feb 23 '11 at 4:20 2011-02-23 04:20
source share