Button won't stay OFF : <p>I have this set up so when the hint button is “ON “the target are will highlight when you start to drag the item. This works fine. But when I switch the button to “OFF” as soon as I start to drag an item the button returns to the “ON” position and highlights the target area. How can the button stay “OFF” so no highlighting occurs?
Here's the button code (full code in fiddle)</p>

<pre><code>function onoff() {
currentvalue = document.getElementById('onoff').value;
if (currentvalue == "Off") {
  document.getElementById("onoff").value = "On";
} else {
  document.getElementById("onoff").value = "Off";
}
}
</code></pre>

<p>Here's jsfiddle <a href="https://jsfiddle.net/aceuk007/8mw1s2zj/" rel="nofollow">Button won't stay OFF</a></p>
