NAVIGATIONS

CSS in customizer, sticky but not on scroll, no slide up

Facebook

Instagram

Unieke ontwerpen

Kwaliteit & Vakmanschap

Handgemaakt

Urban Shopper, Torenallee 60-20

UI ELEMENTS

Banner

#brxe-vxtsie{
display: none;
 opacity: 0;
  position: relative;
}
#brxe-vxtsie:hover #closeBannerButton{
color: var(--secondary);
}
<script>
window.onload = function() {
    var banner = document.getElementById('banner');
    var closeBannerButton = document.getElementById('closeBannerButton');

    function showBanner() {
        banner.style.opacity = '0';
        banner.style.display = 'block';
        banner.style.transition = 'opacity 0.3s ease-in-out';
        setTimeout(function() {
            banner.style.opacity = '1';
        }, 50);
        console.log('Banner shown');
    }

    function hideBanner() {

         banner.style.transition = 'opacity 0.3s ease-in-out';
  banner.style.opacity = '0';
        setTimeout(function() {
            banner.style.display = 'none';
        }, 400);

        sessionStorage.setItem('bannerDismissed', 'true');
        console.log('Banner dismissed and sessionStorage set');
    }

    closeBannerButton.addEventListener('click', hideBanner);

    if (sessionStorage.getItem('bannerDismissed') === 'true') {
        banner.style.display = 'none';
        console.log('Banner hidden due to sessionStorage flag');
    } else {
        setTimeout(showBanner, 3000);
    }
};
</script>