Hi campers,
I am stuck in my weather app due two problems, the first is that I cant make that temperature change from farenheit to celsius and I would like that change when I click in the F (but well this point is not really important).
In my code I have a function that convert Kelvin in farenheit, and other that convert kelvin in celsius, and I indicate the code the result of wich of those two I want to appear in screen. I want create a function that change with one click to the other function and in the other way when I click again:
According that my approach was that:
If the function thar appear in screen change kelvin in farenheit when I click the button this return kelvin to celsius and in the other way, so the code is
$("#change").click(function () {{if (weather.temp == K2F){return K2C }else{ return K2C }};
And in the HTML I have this
<div class><button id = "change">change</button></div>
But that dont work and I dont know how to do it .
The other problem is that my weather app works with the API of OpenWeatherMap and I dont get that the icons appear according to the weather in others devices or computers, actually I only got that the icons appears only in my computer, I know I this is because the location of the icons is my computer, and now I dont know what is the better solution for that.
This is my pen
Thank you for all
Sorry is this post is not clear