I need HELP with Weather homepage. Can't make button work

I need HELP with Weather homepage. Can't make button work
0

#1

Hello, comrades. I NEED HELP. I’ve already cracked my brains but i can’t get to success.
The point is that I can’t make the text on button to change. Console says it can’t find the innerHTML of null. I’ve checked all IDs hundred of times. Here’s link: http://codepen.io/Rezya/pen/yJbkKr
When you will load the page try to press Celcius letter.


#2

what’s making me mad is that i’ve tried to make this on empty project and it worked. http://codepen.io/Rezya/pen/akwbkQ


#3

OH. Finally found. The case was (if someone will face this problem in future) that the element was created by AJAX and it it is not registered in DOM. You need to bind() “click” event listener just after that AJAX.