Here\'s my code:
if (document.getElementById(\"hiddenButton\").style.visibility != \"visible\") { document.getElementById(\"hiddenButton\").style.visibili
Your condition is actually an assignment:
if (document.getElementById("hiddenButton").style.visibility = "hidden") {
You should be using ==:
==
if (document.getElementById("hiddenButton").style.visibility == "hidden") {