Yahoo India Web Search

Search results

  1. Locomotive Scroll with ScrollTrigger scrubbing and pinning. 1. <div class="smooth-scroll"> 2. <div class="description panel blue"> 3. <div><h1>Locomotive Scroll + ScrollTrigger</h1> 4. <p>Demonstrates how ScrollTrigger can be used with a smooth scrolling library like Locomotive Scroll, including scrubbing and pinning.</p> 5.

  2. 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 ...

  3. gsap.registerPlugin(ScrollTrigger); // Using Locomotive Scroll from Locomotive https://github.com/locomotivemtl/locomotive-scroll const locoScroll = new LocomotiveScroll({ el: document.querySelector(".data-scroll-container"), smooth: true, smoothMobile: true }); // each time Locomotive Scroll updates, tell ScrollTrigger to update too (sync ...

  4. In CodePen, whatever you write in the HTML editor is what goes within the <body> tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html> tag. If you want to add classes there that can affect the whole document, this is the place to do it.

  5. Dec 16, 2020 · Locomotive Scroll works primarily through specific attributes in the HTML. Elements with these attributes trigger event listeners in JavaScript when they are in the viewport, then apply CSS transform values as inline styles. There are two key attributes to always call upon Locomotive: data-scroll: detects whether or not an element is in the ...

  6. gist.github.com › BroLetsCodeIt › 055ceba0e56474fd3f83da58989e7716Locomotive + ScrollTrigger · GitHub

    Dec 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. });

  7. 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)

  8. 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)

  9. Apr 11, 2024 · See the Pen Basic Usage by @slax57 on CodePen. Actually, the scrollTrigger property accepts many options, allowing to customize when the trigger should activate and how it will affect the animation. Providing a string value (like ".container") to scrollTrigger is equivalent to passing scrollTrigger: { trigger: ".container" }.

  10. const locoScroll = new LocomotiveScroll({ el: document.querySelector(".smooth-scroll"), smooth: true, smoothMobile: true, lerp: .07, }); locoScroll.on("scroll", ScrollTrigger.update); ScrollTrigger.scrollerProxy(".smooth-scroll", { scrollTop(value) { return arguments.length ? locoScroll.scrollTo(value, 0, 0) : locoScroll.scroll.instance.scroll ...

  1. People also search for