Zum Inhalt springen
Keno Medien – E-Commerce & Shopify Agentur aus Köln

Fülle das Formular aus und hol dir deine ChatGPT Blaupause!

Social Media Kurs für Selbständige

Jetzt unverbindlich in die Warteliste eintragen:

/** * ============================================ * KENO MEDIEN – Deep Insight Optimization * JavaScript Snippet * * EINFÜGEN VIA: * Option 1: WPCode Plugin → Header & Footer → Footer Scripts * Option 2: Elementor → Custom Code → Footer (Pro) * Option 3: Theme Customizer → Additional Scripts * * Den Code in Tags wrappen! * ============================================ */ (function () { 'use strict'; /* ---- Scroll Reveal Animation ---- */ function initScrollReveal() { // Alle Elementor Widgets innerhalb der DIO Sektionen animieren var sections = document.querySelectorAll('.dio-section, .dio-hero-section, .dio-final-cta-section, .dio-footer-section'); sections.forEach(function (section) { var widgets = section.querySelectorAll('.elementor-widget'); widgets.forEach(function (widget, index) { widget.classList.add('dio-reveal-init'); widget.style.transitionDelay = (index * 0.08) + 's'; }); }); var observer = new IntersectionObserver(function (entries) { entries.forEach(function (entry) { if (entry.isIntersecting) { entry.target.classList.add('dio-revealed'); observer.unobserve(entry.target); } }); }, { threshold: 0.1, rootMargin: '0px 0px -30px 0px' }); document.querySelectorAll('.dio-reveal-init').forEach(function (el) { observer.observe(el); }); } /* ---- Sticky Navbar Scroll Effect ---- */ function initStickyNav() { var nav = document.querySelector('.dio-sticky-nav'); if (!nav) return; window.addEventListener('scroll', function () { if (window.pageYOffset > 60) { nav.classList.add('dio-nav-scrolled'); } else { nav.classList.remove('dio-nav-scrolled'); } }, { passive: true }); } /* ---- Smooth Scroll für Anker-Links ---- */ function initSmoothScroll() { document.querySelectorAll('a[href^="#dio-"]').forEach(function (link) { link.addEventListener('click', function (e) { var target = document.querySelector(this.getAttribute('href')); if (target) { e.preventDefault(); target.scrollIntoView({ behavior: 'smooth', block: 'start' }); } }); }); } /* ---- Init ---- */ function init() { initScrollReveal(); initStickyNav(); initSmoothScroll(); } // Warten bis DOM und Elementor geladen sind if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { // Kleiner Delay für Elementor Frontend Rendering setTimeout(init, 100); } })();