I'm trying to return a weather forecast query through the link API but I'm not getting any success. Where am I going wrong?
$.getJSON('http://www.previsaodotempo.org/api.php?city=rio+de+janeiro', function(data){
$('.temperatura').text( "Temperatura:" );
}).done(function() {
$('.sucesso').text( "second success" );
})
.fail(function() {
$('.sucesso').text( "error" );
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<span class='sucesso'></span>
<span class='temperatura'></span>