, , jquery jsonp default callaback query string key "cb", "callback". : jsonp: 'cb'
that.currentRequest = $.ajax({
url: serviceUrl,
data: params,
type: options.type,
jsonp: 'cb',
dataType: options.dataType
}).done(function (data) {
:
var options, a;
$(function(){
options = {
serviceUrl:'http://autocomplete.wunderground.com/aq?c=US&format=jsonp',
minChars: 2,
dataType : "jsonp",
transformResult: function(response) {
console.log('response', response);
return {
suggestions: $.map(response.RESULTS, function(dataItem) {
return { value: dataItem.name, data: dataItem.zmw };
})
};
}
};
a = $('#autoLocation').autocomplete(options);
});
.