I implemented a search from a list of options through Ajax and it works fine. However, to fill in other cascading selections, I would save some html5 "data" attributes according to the filled parameters. The "results" method expects only an array with identifiers and texts. Any idea?
results: function(data, page) {
return { results: $.map(data, function(city, i) {
return {id: city.id, text: city.name};
})}
}
}
source
share