mirror of
https://github.com/devbridge/jQuery-Autocomplete.git
synced 2024-11-29 00:06:36 +00:00
Fixing custom lookup data object
This commit is contained in:
parent
5f7f91af0b
commit
962fe292c3
12
readme.md
12
readme.md
@ -123,11 +123,13 @@ $('#autocomplete').autocomplete({
|
||||
lookup: function (query, done) {
|
||||
// Do ajax call or lookup locally, when done,
|
||||
// call the callback and pass your results:
|
||||
var results = [
|
||||
{ "value": "United Arab Emirates", "data": "AE" },
|
||||
{ "value": "United Kingdom", "data": "UK" },
|
||||
{ "value": "United States", "data": "US" }
|
||||
];
|
||||
var results = {
|
||||
"suggestions" : [
|
||||
{ "value": "United Arab Emirates", "data": "AE" },
|
||||
{ "value": "United Kingdom", "data": "UK" },
|
||||
{ "value": "United States", "data": "US" }
|
||||
]
|
||||
};
|
||||
|
||||
done(results);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user