This makes my div appear (when the display attribute is set to none) using the onclick event:
divTest = document.getElementById('linkContainer2');
if (divTest.style.display === "none") {
divTest.style.display = '';
}
I thought this would make it appear and disappear (depending on the display attribute) using the onclick event, but it doesn’t. Why?
divTest = document.getElementById('linkContainer2');
if (divTest.style.display === "none") {
divTest.style.display = '';
} elseif (divTest.style.display === "") {
divTest.style.display = "none";
}