I try to use JQuery autocomplete and I get this error:
Uncaught SyntaxError: Unexpected token < in JSON at position 2
My code is like this, the HTML:
<div id="fastSearchBox" class="fastSearchBox">
<span style="direction: rtl; float: right;">search</span>
<input id="fastSearchInput" type="text" style="width: 150px; margin-right: 10px;"></input>
</div>
The javascript:
users = [{"data":1,"value":"foo"}];
$("#fastSearchInput").autocomplete({
source: users,
select: function (event, ui)
{
}});
I have no idea why but changing sourceto lookup made it works