Equality Federation won’t stop until all LGBTQ+ people are fully empowered and represented in their communities, experiencing full equality in their lives.
/* =============================================
Timed Popup — Shows after a delay on every page
Closes on: X button, overlay click, or Escape key
Once per session (won't show again until new session)
============================================= */
document.addEventListener("DOMContentLoaded", function () {
/* Target the popup elements by their Webflow classes */
const popup = document.querySelector(".modal-popup_wrapper");
const closeBtn = document.querySelector(".modal-popup_close");
const overlay = document.querySelector(".modal-popup_overlay");
/* Check if popup has already been seen this session */
if (sessionStorage.getItem("popupSeen")) return;
/* Show the popup after a delay
Change 4000 to adjust timing (1000 = 1 second) */
setTimeout(function () {
popup.style.display = "flex";
popup.removeAttribute("aria-hidden");
closeBtn.focus(); /* Moves focus to close button for accessibility */
}, 4000);
/* Close the popup and record the session */
function closePopup() {
popup.style.display = "none";
popup.setAttribute("aria-hidden", "true");
sessionStorage.setItem("popupSeen", "true"); /* Prevents popup from showing again this session */
}
/* Close triggers */
closeBtn.addEventListener("click", closePopup); /* X button */
overlay.addEventListener("click", closePopup); /* Clicking the dim background */
document.addEventListener("keydown", function (e) {
if (e.key === "Escape") closePopup(); /* Escape key */
});
});