PageSourceSearch

https://lybrae.nl/wp-content/cache/min/1/wp-content/themes/lybrae/js/animations.js?ver=1788429227

js lybrae.nl collected 2026-10-06 13:18:02 UTC 4,905 bytes, 9 lines download raw bytes

1document.addEventListener("DOMContentLoaded",function(){animateDropdowns();animateGhostKitColums();parallaxScrollingElements()});window.addEventListener("load",()=>{animateCards();animateH2();animateTextscroller()});document.addEventListener("DOMContentLoaded",function(){const parent=document.querySelector(".traineeships-page");if(!parent)return;animateHeadings(parent);animatePaperPlane();console.log("animateHeadings")});function animateDropdowns(){document.querySelectorAll(".dropdown").forEach((dropdown)=>{const toggle=dropdown.querySelector('[data-bs-toggle="dropdown"]');const menu=dropdown.querySelector(".dropdown-menu");if(!menu||!toggle)return;const bsDropdown=new bootstrap.Dropdown(toggle,{autoClose:!1});const dropdownAnim=gsap.timeline({paused:!0,defaults:{duration:0.2,ease:"power2.out"},});dropdownAnim.fromTo(menu,{opacity:0,y:20},{opacity:1,y:40});dropdown.addEventListener("mouseenter",()=>{bsDropdown.show();dropdownAnim.play()});dropdown.addEventListener("mouseleave",()=>{dropdownAnim.reverse().eventCallback("onReverseComplete",()=>{bsDropdown.hide()})})})}
2function animateH2(){const headings=document.querySelectorAll("h2.animate, .h2.animate");
2headings.forEach((title)=>{const split=new SplitText(title,{type:"words"});const tl=gsap.timeline({scrollTrigger:{trigger:title,start:"top 85%",once:!0,},});tl.from(title,{y:20,opacity:0,duration:0.5,ease:"power2.out",});tl.from(split.words,{opacity:0,y:10,stagger:0.05,duration:0.4,ease:"power2.out",},"-=0.3",);tl.call(()=>{title.classList.add("line")},{},"-=0.5",)})}
3function animateGhostKitColums(){const grids=document.querySelectorAll(".animate-columns-stagger");grids.forEach((grid)=>{const columns=grid.querySelectorAll(".ghostkit-col");const tl=gsap.timeline({scrollTrigger:{trigger:grid,start:"top 75%",end:"top 20%",scrub:!1,toggleActions:"play none none none",},});gsap.set(columns,{opacity:0,y:50,scale:0.8,});tl.to(columns,{opacity:1,y:0,scale:1,stagger:0.3,duration:0.75,ease:"power2.inOut",})})}
4function animateCards(){const cards=document.querySelectorAll(".card");cards.forEach((card)=>{gsap.from(card,{opacity:0,y:50,duration:0.8,ease:"power2.out",scrollTrigger:{trigger:card,start:"top 85%",toggleActions:"play none none none",},})})}
5document.addEventListener("DOMContentLoaded",function(){const hash=window.location.hash;if(hash==="#vacature-form"){const el=document.querySelector(hash);if(el){setTimeout(()=>{el.scrollIntoView({behavior:"smooth"})},200)}}});function animateTextscroller(){const textScrollers=document.querySelectorAll(".fullwidth-contentblock__scrolling-text");textScrollers.forEach((scroller)=>{const tl=gsap.timeline({scrollTrigger:{trigger:scroller,start:"top bottom",end:"bottom top",scrub:1,},});tl.set(scroller,{x:"25%",});tl.to(scroller,{x:window.innerWidth>768?"-50%":"-75%",ease:"linear",})})}
6function parallaxScrollingElements(){const parallaxElements=document.querySelectorAll("[data-speed]");if(!parallaxElements.length)return;const elementStates=new Map();function updateParallax(){if(window.innerWidth<1000)return;const scrollTop=window.scrollY||document.documentElement.scrollTop;const viewportCenter=scrollTop+window.innerHeight/2;const viewportBottom=scrollTop+window.innerHeight;const neutralLine=(viewportCenter+viewportBottom)/2;parallaxElements.forEach((el)=>{const speed=parseFloat(el.dataset.speed)||1;const lerpFactor=el.dataset.lerp!==undefined?parseFloat(el.dataset.lerp):0.08;const rect=el.getBoundingClientRect();const elementOffset=rect.top+scrollTop;const elementCenter=elementOffset+rect.height/2;const distanceFromNeutral=elementCenter-neutralLine;const targetY=distanceFromNeutral*(speed-1)*0.2;const currentY=elementStates.get(el)??0;const newY=lerpFactor>0?currentY+(targetY-currentY)*lerpFactor:targetY;el.style.transform=`translateY(${newY}px)`;elementStates.set(el,newY)});requestAnimationFrame(updateParallax)}
7requestAnimationFrame(updateParallax)}
8function animateHeadings(parent){const headings=parent.querySelectorAll("h1, h2, h3");if(!headings?.length)return;
8headings.forEach((heading)=>{const text=new SplitText(heading,{types:"words"});const words=text.words;if(!words?.length)return;gsap.from(words,{opacity:0,y:-10,stagger:0.1,ease:"power1.out",duration:0.8,scrollTrigger:{trigger:heading,start:"top bottom",toggleActions:"play none none none",},})})}
9function animatePaperPlane(){const arrows=document.querySelectorAll(".animated-arrow");arrows.forEach((svg)=>{const line=svg.querySelector(".cls-3");const plane=svg.querySelector("#Generative_Object");if(!line||!plane)return;const length=line.getTotalLength();line.style.strokeDasharray=length;line.style.strokeDashoffset=length;gsap.set(plane,{autoAlpha:0});const tl=gsap.timeline({scrollTrigger:{trigger:svg,start:"top 80%",toggleActions:"play none none none",markers:!1,},});tl.to(line,{strokeDashoffset:0,duration:1.5,ease:"power1.inOut"}).to(plane,{autoAlpha:1,duration:0.5},"+=0")})}

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.