HELP PLEASE -- Weather App Project

I’ve spent around 8 hours on this and I feel like I’m incredibly stuck. I stripped all the styling down to the bare minimum, I need help understanding the JS and jQuery stuff.

What I don’t understand is how to manipulate the DOM with the location/weather/temp data with jQuery.

I think I have the basic skeleton relatively correct, I need a nudge in the right direction with what to do with the API info and passing it tot he DOM.

I am most very grateful for your help!

You do not have any weather data yet, because you have not made a request to a weather API. Inside the navigator.geolocation.getCurrentPosition callback function you have variables lat and long, so you will need to find a weather API which uses lat and long to retrieve the data. You can use $.ajax to make the request and use the variable api as the url for the request. Read about $.ajax and see if you can try to use it in your solution. If you get stuck, let us know.

I’m attempting to use the API provided by free code camp

is it as simple as putting this inside the navigator.geolocation.getCurrentPosition callback?

var api =; // ???

That is part of it, but you will need to use the $.ajax jQuery method and then use your created api variable above as the url to request.

1 Like

Still working on this, standby…