Hello, I’m struggling with the switch button in the local weather app. Firstly I just want that everything works, after that I’ll improve the look.
Here is my pen:
In the switch (at the bottom of the js file) I’m trying to get the html of my temp class. If it’s “Temp: " + tempF I want to replace it. I tried to “console.log $(”.temp”).html" but I can’t really get the inner HTML. What do I’m missing? What is wrong?
Hopefully somebody can help me out!
Hey just looked at the issue.
In the console it says “Uncaught ReferenceError: tempF is not defined” that is because
tempF is a local variable to your
So you will need to find a way to define
tempC outside of the
I don’t want to give you the answer so I hope that will help get you over that hump for now.
Adding: basically other functions cannot see
tempC right now. They do not even know it exist.
Oh, amazing. Now it works.
Extremly dump mistake… Thank you!
Lol no problem. It happens to the best of us.