Jquery Autocomplete failing the focus-Collection of common programming errors
I am working with autocomplete, I want to add an header to the list and it is getting me complicated, I am having some problems with this: This is my code:
var autocompleteCounselor = function () {
$(this.el).find('.alternateCounselorAutocomplete').autocomplete({
minLength: 0,
source: this.counselorValidDelegates,
focus: function (event, ui) {
console.log(ui);
$(".alternateCounselorAutocomplete").val(ui.item.NAME());
return false;
},
select: function (event, ui) {
onAutocompleteAlternateCounselorSelected.apply(_self, [event, ui, _self.counselorFullValidDelegates]);
}
}).data("ui-autocomplete")._renderMenu = function(ul, items){
var self = this;
ul.append("
Name"+ "Title