I’ve coded for converting from Celsius to Fahrenheit, but on detecting the click (line 120) the page reloads with the default, which I’ve set to be Celsius (line 116). The console log shows that it’s passing through the code to change C to F.
I can’t see how to set an initial default (‘C’), but from then on, use F if the user has clicked on the C to request Fahrenheit. I’m trying to get it to toggle, but instead line 116 reloads the page and sets the scale indicator back to Celcius.
Here’s the code: http://codepen.io/roygrubb/pen/rrmPzA
What should I be doing here, please?