Created
January 7, 2014 04:35
-
-
Save irfn/8294669 to your computer and use it in GitHub Desktop.
ip to weather
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
var locate = function(locationInfo) { | |
var city = locationInfo.city.replace(" ", "_"); | |
var region = locationInfo.region; | |
$.get('http://api.wunderground.com/api/91425b2b253b294f/forecast/q/'+region+'/'+city+'.json', function(response) { | |
console.log(response.forecast.forecastday)}) | |
}); | |
} | |
$.get('http://ip-api.com/json/199.48.152.51?callback=locate') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment