I want a counter to display a button for each new visitor that when clicked once will increment the display BUT only allow a single click per visitor.
Like this but with a the button being disabled after one click https://stackoverflow.com/a/13328728/4307913
<script>
var x = 0;
var already = false;
function cnt() {
if(!already) {
document.getElementById("num").innerHTML = x+=1;
already = true;
}
}
</script>
<div id="counter">
<h2> support counter </h2>
<div onclick="cnt()">
<span id="num">Click here to show support</span>
</div>
</div>
I found this link: https://stackoverflow.com/a/12651098/4307913 is this mandatory?