Response title
This is preview!
I am using jquery v 2.0.0 and jquery ui 1.10.3
Following is my jquery ui autocomplete code:
$nameField.combobox({
source: people,
buttonSelector: '.toggleList',
focus: function () { return false; },
select: function (event, ui) {
$nameField.val(ui.item.name).data({
id: ui.item.id,
name: ui.item.name,
birthdate: ui.item.birthdate
}); return false; }
}).data('ui-autocomplete')._renderItem = function (ul, item) { if (!_.include(self.idArr, item.id)) { return $('<li></li>').data('ui-autocomplete-item', item).append('<a>' + item.name + '</a>').appendTo(ul); } };
This was working perfectly in older version of jquery. But after the upgrade, when I click the.toggleList
button, it opens the first time and there's another button to add the selected name to a div. After that when I click the `.toggleList' combo selector, the autocomplete is not opening. It gives me the following error:
Uncaught TypeError: Cannot call method 'data' of undefined jquery.ui.autocomplete.js?1376892069:527
Anyone came across any issues like this? I tried several fixes mentioned in other stackoverflow threads, but none of them are working for me.
Hope someone could help me to fix this bug
Thanks
© 2013 jQuery Foundation
Sponsored by and others.