Tuote on lisätty ostoskoriin Näytä ostoskoriKassalle
0 Tuotteet
Ostoskori
Your browser is not supported. For the best experience, a newer version or another browser is recommended.
const storage = sessionStorage; const consentPropertyName = "a"; const showPopup = () => !storage.getItem(consentPropertyName); const saveToStorage = () => storage.setItem(consentPropertyName, true); window.onload = () => { let modalPopup = document.getElementsByClassName("modal-popup"); let popupContainer = document.getElementById("popup-container"); let closeBtn = document.getElementById("closePopupBtn"); const closePopup = event => { saveToStorage(storage); popupContainer.style.display = "none"; modalPopup[0].style.display = "none"; } closeBtn.addEventListener("click", closePopup); popupContainer.addEventListener("click", closePopup); console.log("Hello world"); if (showPopup(storage)) { setTimeout(function () { popupContainer.style.display = "flex"; modalPopup[0].style.display = "flex"; }, 3000); } }