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



Reply With Quote



Bookmarks