Weather App doesn't work until I click Btn

Weather App doesn't work until I click Btn
0.0 0

#1

Hi, hoping for a little help with my weather app. When first loading the page the temperature and weather description don’t load. But then for some reasons when I click the “celsius/fahrenheit” button they pop up and it works fine. Here’s the link if anyone can take a look https://codepen.io/MarcelPenn/pen/qVyyRb


#2

That is because you have not called render inside the anonymous $.getJSON success function. You do call render inside the click event handler callback function for the anchor tag with id=“toggle”, which is also inside the $.getJSON success function.

Actually, you have the render call commented out for some reason.


#3

Hey thanks again. Not sure why I had those commented out lol