I'm trying to make a program that when you visit the site, it shows the div, a button is pressed to hide it, and it isn't shown again until chrome is closed and reopened.
function check() {
if (sessionStorage.alreadyClicked) {
document.getElementsByClassName('disclaimer-container')[0].style.display = "none";
sessionStorage.alreadyClicked = 1;
}
I've tried adding sessionStorage.alreadyClicked
to by code as seen here to no avail.
No matter what I do the div will always show. I'm looking a cross browser solution in the long term but as of now just chrome.