Last active
August 31, 2016 09:23
-
-
Save jimmy89Li/5eec9aef9aff458acb1975fb17bdc074 to your computer and use it in GitHub Desktop.
Get the Celsius degrees for a specific city
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.getJSON('http://api.wunderground.com/api/API_KEY/conditions/q/CITY_NAME.json', function(Weather) { | |
var weatherInfo = Weather.current_observation; | |
console.log(weatherInfo.temp_c); | |
document.getElementById('weatherTempC').innerHTML = weatherInfo.temp_c; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment