I'm trying to get a time data from json with the code bellow, but i get a error instead of the data, what can be happening?
$.ajax({
type: "POST",
url: "http://www.previsaodotempo.org/api.php?city=Rio+De+Janeiro",
success: function(data) {
alert()
data.location;
$("div").html(data);
},
error: function(data) {
$("div").html('can not get the json');
}
});
Here is a fiddle: http://jsfiddle.net/jodgjqwf/