1// Get if the scroll position of an given element is within the visible area 2// less then 0 means, its not yet in visible area ( further down ) 3// more then 1 means, its above the current visible area 4// the float can be uset as percentual value, of how much of his "scoll lifetime¨ is over 5function getScrollFactor(element) { 6 const rect = element.getBoundingClientRect(); 7 8 if (rect.y > window.innerHeight) { 9 //console.log("Darunter"); 10 } else if ((window.innerHeight / 100) * (rect.y + rect.height) < 0) { 11 //console.log("Darüber"); 12 } else { 13 let VisibilityProgress = 14 (window.scrollY / (rect.top + window.scrollY + rect.height)) * 1; 15 let percentVisibility = VisibilityProgress * 100; // percent version of factor 16 return VisibilityProgress; 17 } 18} 19 20// animation for the box backgrounds 21// factor can be a float between 0 and 1 22function boxBackgroundParallax(element, factor) { 23 let strength = 0.4; 24 if (typeof factor !== "number" || isNaN(factor)) factor = 0; 25 let ScaleTransformation = 1 + factor * strength; 26 element.querySelector(".dw__grid_box_background").style.transform = 27 "scale(" + ScaleTransformation + ")"; 28} 29 30window.addEventListener("scroll", () => { 31 const Boxes = document.querySelectorAll(".dw__grid_box"); 32 33 Boxes.forEach((Box) => { 34 boxBackgroundParallax(Box, getScrollFactor(Box)); 35 }); 36}); 37 38window.onload = function () { 39 window.onload = function () { 40 const mauticCarousel = document.querySelector( 41 "#mauticform_input_dwnewsletteranmeldung_annahme_der_agbs_und_date", 42 ); 43 if (mauticCarousel) { 44 mauticCarousel.insertAdjacentHTML( 45 "afterbegin", 46 '<h3 onclick="mauticCarouselOpen()" style="margin-bottom:0; cursor:pointer;">ð Wie verarbeiten wir Ihre Daten?</h3>', 47 ); 48 } 49 }; 50}; 51 52function mauticCarouselOpen() { 53 const mauticCarousel = document.querySelector( 54 "#mauticform_input_dwnewsletteranmeldung_annahme_der_agbs_und_date", 55 ); 56 const contentBlocks = mauticCarousel.querySelectorAll("h5"); 57 contentBlocks.forEach((content) => { 58 content.classList.toggle("visible_accordeon"); 59 }); 60} 61 62document.addEventListener("DOMContentLoaded", function () { 63 var splide = new Splide("#testimonial_splide", { 64 easing: "ease", 65 perPage: 1, 66 arrows: false, 67 autoplay: false, 68 rewind: true, 69 }); 70 splide.mount(); 71});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.