source: function (request, response) {
$.ajax({
url: requestUrl,
dataType: "json",
data: { query: request.term },
success: function (data) {
response($.map(data, function (item) {
return {
label: item.Name,
value: item.Name,
realValue: item.UID,
lastPrice: item.LastPrice,
};
}));
},
});
},
Reference:
http://stackoverflow.com/questions/21146589/how-to-populate-extra-fields-with-jquery-autocomplete
No comments:
Post a Comment