Weather app changing pictures?

No
Not the pictures, but the background color change and the icon returned from the server is assigned to the placeholder correctly

My weather icons donā€™t show up with that code.

I only have your codepen code to play withā€¦
Dunno what pictures you are trying to displayā€¦

Canā€™t you copy the code into an IDE and check? Thanks for helping me, though.

Currently, yes. Sorry for the yellow as a warmer color, itā€™s too vibrant but I will fix tomorrow.

EDIT: Sorry for the late reply. I really appreciate all the help.

Also, trying to find a way to search for any city and set the weather to that location. I know in the Docs it shows city name e.g.: q=Paris.

So, I tried a string literal inside of the API call after q= and couldnā€™t get it to work.

I will try to work on what you just told me. Yes, the images do NOT work when I use that code. Stressing a bit at this point to get it all done. And for the cities, Iā€™m trying to search any city in the world and have the weather show up. There has gotta be an easier way of using the same API string and searching all the cities without making an array of every city in the world.

Wow, that string literal change worked wonderfully. Thank you!!

Thanks so much I got it to work!

I donā€™t believe I would. I looked through the docs and tried a string literal to add to my API with the input value of the searchbar.

Up top I declared searchbar and put the string literal in the API. You understand what Iā€™m trying to achieve here, right? Just search for the city and put the weather info up.

This is the current, the city comes up but the problem is it isnā€™t going through the for loop again to append the weather of that city.

EDIT: Just trying to clear the conditions and forecast and then re-append it once the search goes through.

Got it to work hereā€¦thank you again!

Will have to add a bit of things like a local weather button, and stying for the input form. :slight_smile:

Also, having trouble with having it switch to celsius depending on the location and the colors of the background.

I think all the functionality works when the location is in US, but breaks if it is elsewhere. It definitely has to do with

    //Append current location
    let location = document.getElementById(`location`)
    if (country === `United States of America`) {
      country = `US`
      //Set default to fahrenheit, gray out celsius
      temp.innerText = fahrenheit + `Āŗ`
      degTypeF.classList.add(`on`)
      degTypeC.classList.add(`off`)
    } else {
      temp.innerText = celsius + `Āŗ`
      degTypeF.classList.add(`off`)
      degTypeC.classList.add(`on`)
    }
    location.innerText = curLocation + `, ` + country

Updated, but havenā€™t fixed Wind kph yet.

So, when I open up the app it is reading as fahrenheit in the US. When I search for Paris for example, it shows Celsius properly, and then when I search for example: Phoenix, AZ, it breaks the toggling back to fahrenheit. I know it has to do with something in the for loop. But that is the current problem I am on.

Itā€™s giving me an absolute headache because this is essentially the last part of the functionality I need to solve.

Absolutely, please help with this. I understand the isImperial/Metric boolean is a great way to go about it, but I am very unsure how to start it.

EDIT: Another bug I have found is that the colors arenā€™t really working properly when it comes to celsius. Iā€™m only really checking for fahrenheit it seems like.

Finally got it to work. Had to refactor a whole bunch of stuff, but I got the event listeners out of the loop. My next one to attack is the colors depending on celsius as well.