[Solver] Disable and enable button

[Solver] Disable and enable button
0

#1

Why my getTemp() function doesn’t work? Why n change in my if-control?
https://codepen.io/stefalber/pen/pdMNNw


#2

Part of the problem is in the following line:

$("#cels").on("click", getTemp());

Do not call the function, just specify the function without ().

$("#cels").on("click", getTemp);

#3

@randelldawson i tried it, but still doesn’t work.


#4

My suggestion does not completely solve your issue, but it does stop an error you were getting in the console that was causing other issues.


#5

@randelldawson now i changed my code and my if-control but doesn’t work and i don’t understand why.


#6

Looks like it is working now. Let us know if you have any further questions.


#7

I solved. I remove if-control and just put two new function.