I am trying to get the information from this weather API.
http://api.openweathermap.org/data/2.5/weather?lat=39.607966&lon=-106.354868&APPID={MY KEY}&units=imperial
I tried this:
var $data = $('#weather');
$.ajax({
type: 'GET',
url: 'http://api.openweathermap.org/data/2.5/weather?lat=39.607966&lon=-106.354868&APPID={MY KEY}&units=imperial',
success: function(data) {
$.each(data, function(i, weather) {
$data.append('<li>temp: ' + weather.main.temp + '</li>')
});
}
});
but nothing is printing out on the page did I do something wrong?
my html has has a ul id="weather" in it
F12) to see if any request is being made at all? - Jia Jian Goi