Widerrufs­recht

document.addEventListener('DOMContentLoaded', function() { document.getElementById('newsletterButton').addEventListener('click', function() { var footerElement = document.querySelector('.footer'); var topBarHeight = document.querySelector('.top-bar')?.offsetHeight || 0; var navbarHeight = document.querySelector('.navbar')?.offsetHeight || 0; var shippingInfoHeight = document.querySelector('#shippinginfo')?.offsetHeight || 0; var totalOffset = topBarHeight + navbarHeight + shippingInfoHeight; if (footerElement) { var footerPosition = footerElement.getBoundingClientRect().top + window.pageYOffset - totalOffset; window.scrollTo({ top: footerPosition, behavior: 'smooth' }); } }); });
document.addEventListener('DOMContentLoaded', function() { const toggleButton = document.getElementById('mobileMenuToggle'); const mobileMenu = document.getElementById('mobileMenu'); const originalMenu = document.querySelector('.main-navbar-collapsable').innerHTML; // Adjust selector as needed toggleButton.addEventListener('click', function() { const isExpanded = this.getAttribute('aria-expanded') === 'true'; this.setAttribute('aria-expanded', !isExpanded); mobileMenu.setAttribute('aria-hidden', isExpanded); if (!isExpanded && mobileMenu.innerHTML === '') { // Copy the menu into the mobileMenu container only if it's empty to avoid duplicates mobileMenu.innerHTML = originalMenu; } mobileMenu.style.display = isExpanded ? 'none' : 'block'; }); });