link to fiddle : http://jsfiddle.net/nEapJ/ (working)
var items = [{
label : 'a',
value : 'a',
},{
label : 'b',
value : 'b',
},{
label : 'c',
value : 'c',
}];
$('input').autocomplete({
source : items
});
This code works, but when i want to set source by callback function then It's not working
link to fiddle : http://jsfiddle.net/B3RWj/ (not working)
$('input').autocomplete({
source : function(request, response){
response(items);
}
});
when i type, 'a' then its give a,b,c as result.
So, what am I missing?
thanks, in advance.