Why has my button stopped working!

Why has my button stopped working!
0

#1

Can somebody please review this and see if you can work out why my button (to change from C to F degrees) has stopped working.

It was, and then I fiddled…

Thanks


#2

Well … it doesn’t look like you are doing anything in the click handler:


$("button").on("click", function() {
    //function changeCF() {
    if (unit == "metric") {
      unit = "imperial";
    } else {
      unit = "metric";
    }
  });

It’s just setting a unit variable …

If there’s another handler for clicking that button, I didn’t see it anywhere.