Everything seems to work except when I add the following lines in the autocomplete select function:
select: function(event)
{
BK.searchIndex = $.inArray(ui.item.value, BK.arrayList);
alert(BK.searchIndex);
});
In firebug, I see the following error message:
ReferenceError: ui is not defined
BK.searchIndex = $.inArray(ui.item.value, BK.arrayList);
If I comment out code in select, everything works. Any idea what could be causing this problem?
Should be this: