function myFunction() {
var x = document.getElementById("myDIV");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "block";
}
}
I already check all over the internet yet I can't figure it out. Every time it loads I have to click it twice in order to show the element. I also tried to replace
else {
x.style.display = "none";
none
to block
. it works but doesn't go back. I hope you guys can help me Thank you in advance