Need help with weather app. Can't get icon url! Why?

Need help with weather app. Can't get icon url! Why?
0

#1

Hey,

I’ve problems figuring out how to output my weather icons from the fcc weather api. It’s bothering me so much and i can’t find answers on the internet. I have added alert(icon) to show whats actually going on but it says ‘undefined’. Or is there any other way to solve it. feel free to fork my pen.

Here’s my project pen: https://codepen.io/Lexry/full/dzeOpz/

Also, disregard the layout. I plan to work the css3 last :slight_smile:

Okay, I figured that part out but i’m having trouble with this code.

$('#icon').html("<img src = "icon"></img>");


#2

I checked out your pen. It looks like you figured out how to get the icon value.


#3

yeah, for some reason, i had to restart my computer and it suddenly showed up… Thanks for checking out. :slight_smile:


#5

$('#icon').html("<img src = "icon"></img>");

Why doesn’t this work?


#6

I just checked your Codepen at 11:55 PM PST, and you figured out how to show the icon. Great!