Загружаю автозагрузку Jquery UI, глядя на remote-jsonp.html. Это функция ajax, но я открываю консоль.. Я не вижу никакого запроса в моей консоли...
В чем разница между dataType: "jsonp" и dataType; "JSON"
$( "#city" ).autocomplete({
source: function( request, response ) {
$.ajax({
url: "http://ws.geonames.org/searchJSON",
dataType: "jsonp",
data: {
featureClass: "P",
style: "full",
maxRows: 12,
name_startsWith: request.term
},
success: function( data ) {
response( $.map( data.geonames, function( item ) {
return {
label: item.name + (item.adminName1 ? ", " + item.adminName1 : "") + ", " + item.countryName,
value: item.name
}
}));
}
});
},
Ссылка http://jqueryui.com/demos/autocomplete/remote-jsonp.html