javascript 모달팝업 / 지정된 날짜까지 보여지기 내용 오늘 하루 안보기 닫기 document.addEventListener("DOMContentLoaded", function () { const modal = document.getElementById("modal"); const modalContent = document.querySelector(".modal-content"); const closeModalBtn = document.getElementById("closeModalBtn"); const hideTodayBtn = document.getElementById("hideTodayBtn"); const currentDate = new Date(); const expirationDate = new Date("2023-12-24"); if (cu.. 🕹 스크립트 2023.10.17
javascript <li> 여러개 팝업 " alt=""> const img_open = (e) => { let img = $(e).find("img").attr("src") // console.log(img) window.open(img, "_blank", "width=600, height=850, top=70, left=600, scrollbar=no, resizable=no")} 🕹 스크립트 2023.08.28
스크립트 모달 팝업 2개 닫기 다시 안보기 닫기 다시 안보기 다시 안보기 부분 -> 오늘 하루 안보기로 변경 // 하단에 오늘 하루 안보기 버튼 부분만 변경(변수명 확인 후 잘 바꾸기) hideTodayButton.addEventListener("click", function() { const hideUntil = new Date(); hideUntil.setDate(hideUntil.getDate() + 1); // Add one day to the current date localStorage.setItem("hideUntil", hideUntil.toISOString()); closePopup1(); }); const hideUntilDate = localStorage.getItem("hideUntil"); if (!hid.. 🕹 스크립트 2023.06.07
모달 팝업 닫기 오늘 하루 안보기 .popup { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 9999; display: none; .popup-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: #fff; padding: 20px; text-align: center; border-radius: 20px; figure { width: auto; height: 80vh; } } .btnArea { display: flex; justify-c.. 🕹 스크립트 2023.04.18