Please help with Weather App task

Here is my pen:
Here is what I see in the console:

  1. The error appears occasionally I don’t know why.
  2. The code below runs automatically, without the element being clicked.

Please help,

Hi Ben. I’ve just barely finished this challenge myself, and from what I’ve seen, it’s a security issue. Here’s more information, but the gist of it is that you should try using jsonp instead of json.

1 Like

Hi, I used Ajax request, and it solved the problem.
I still have a problem with the setTemp function running, even though the click condition was not met.

Hey Ben. I’m not 100% sure but could it be because #degrees is not a button?

It does not have to be a button. You can create click events on any (or almost any) html element.