mardi 31 mars 2015

how to amazon autocomplete scopes to books

I am using Amazon auto-complete suggestions in my site. It is working well but I want to scope it only for books.My code as following



$(document).ready(function () {
jQuery('input.autocomplete').autocomplete({
source: function (request, response) {
jQuery.ajax('http://ift.tt/1d55rlk', {
cache: true,
data: {
client: 'amazon-search-ui',
mkt: 1,
'search-alias': 'aps',
q: request.term
},
error: function () {
response([]);
},
success: function (data) {
response(data[1]);
},
dataType: 'jsonp'
});
}
});
});


This code is working on autocomplete css class. If you know something about this please let me know.





1 commentaire: