Hey, I’m working on my “Show the Local Weather” challenge, and I need some help. The function associated with the json request to get the weather just doesn’t run. Here’s the CodePen link if you’d like: Here
$(document).ready(function() {
console.log("Loading Page...");
navigator.geolocation.getCurrentPosition(function(position) {
var lat = position.coords.latitude;
console.log("lat: " + lat);
var long = position.coords.longitude;
console.log("long" + long);
site = "https://api.darksky.net/forecast/be53896f50e562397d410b599514231b/" + lat + "," + long;
console.log(site);
$.getJSON(site, function(json) {
console.log(json.currently.summary);
});
});
});