Nostalgia, is everywhere. It's like an old flame that keeps popping up in our lives, seducing us with memories of better times. For years, we've seen trends from bygone eras trickle back into popular culture.
From music to tech to entertainment to design to food, the allure of recent history has seeped into all facets of our lives. Gen Z is even nostalgic for eras they never lived through, embracing trends from the 90s and 2000s with an insatiable hunger. But are we slowly self-cannibalising our past? Is nostalgia the enemy of the new? Is originality in decline? Is culture stuck?
// Add an event listener for the scroll event on the window.
window.addEventListener("scroll", () => {
// Get the current scroll position.
let scrollTop = window.scrollY;
// Get the total height of the document.
let docHeight = document.body.offsetHeight;
// Get the height of the window.
let winHeight = window.innerHeight;
// Calculate the percentage of the page that has been scrolled.
let scrollPercent = scrollTop / (docHeight - winHeight);
let scrollPercentRounded = Math.round(scrollPercent * 100);
// Try to open the popup if the visitor has scrolled more than 25% of the page and is not a member.
if (scrollPercentRounded > 25) {
openPopup();
}
});