I have a problem where I have to click twice in order for my JavaScript function to run.
HTML for the button:
<input type="button" id="logintrigger" value="Log In" onClick="hideshow();"/>
JavaScript:
function hideshow() {
var toggle = document.getElementById('logincontainer');
toggle.style.display = toggle.style.display == "none" ? "block" : "none";
}
I have been searching around and haven't found anything that helped.
Thank You.