To get this working you need modify source because jquery jsonp default callaback query string key is not "cb", but "callback". So in the autocomplete source add: jsonp: 'cb'
that.currentRequest = $.ajax({
url: serviceUrl,
data: params,
type: options.type,
jsonp: 'cb',
dataType: options.dataType
}).done(function (data) {
Then your code should be:
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);
});
This is working fine for me.