Αποτελέσματα Αναζήτησης
gsap.registerPlugin(ScrollTrigger); // Using Locomotive Scroll from Locomotive https://github.com/locomotivemtl/locomotive-scroll const locoScroll = new LocomotiveScroll({ el: document.querySelector(".smooth-scroll"), smooth: true }); // each time Locomotive Scroll updates, tell ScrollTrigger to update too (sync positioning) locoScroll.on ...
gsap.registerPlugin(ScrollTrigger); // Using Locomotive Scroll const locoScroll = new LocomotiveScroll({ el: document.querySelector(".smooth-scroll"), smooth: true }); // each time Locomotive Scroll updates, tell ScrollTrigger to update too (sync positioning) locoScroll.on("scroll", ScrollTrigger.update); // tell ScrollTrigger to use these ...
16 Νοε 2022 · Configure ScrollTrigger and Locomotive. The first thing we should do after initialization is to make sure that ScrollTrigger updates each time the user scrolls using Locomotive. This is done...
27 Δεκ 2023 · Locomotive + ScrollTrigger. Raw. locomotive.js. function loco () { gsap.registerPlugin (ScrollTrigger); // Using Locomotive Scroll from Locomotive https://github.com/locomotivemtl/locomotive-scroll. const locoScroll = new LocomotiveScroll ( { el: document.querySelector ("#main"), smooth: true. });
gsap.registerPlugin(ScrollTrigger); // --- SETUP START ---// Using Locomotive Scroll from Locomotive https://github.com/locomotivemtl/locomotive-scroll: const locoScroll = new LocomotiveScroll({el: document.querySelector(".smooth-scroll"), smooth: true}); // each time Locomotive Scroll updates, tell ScrollTrigger to update too (sync positioning)
12 Ιουν 2022 · gsap.registerPlugin(ScrollTrigger); // Using Locomotive Scroll from Locomotive https://github.com/locomotivemtl/locomotive-scroll: const locoScroll = new LocomotiveScroll({el: document.querySelector(".smooth-scroll"), smooth: true}); // each time Locomotive Scroll updates, tell ScrollTrigger to update too (sync positioning)
Locomotive Scroll. Detection of elements in viewport & smooth scrolling with parallax effects. Installation. ⚠️ Scroll-hijacking is a controversial practice that can cause usability, accessibility, and performance issues. Please use responsibly. npm install locomotive-scroll. Usage. Basic. With simple detection. HTML.