Yahoo India Web Search

Search results

  1. A free, fast, and reliable CDN for locomotive-scroll. Detection of elements in viewport & smooth scrolling with parallax effects.

    • Usage Statistics

      Load modern JavaScript packages built for you on-demand....

    • Files

      A free, fast, and reliable CDN for locomotive-scroll....

    • GitHub

      By using jsDelivr CDN URLs you get better performance...

    • Esm.Run

      A New-Age CDN for JavaScript modules Load modern JavaScript...

    • Blog

      During the night, on May 2, 2024, the jsDelivr CDN domain...

    • Purge Cache

      Purge jsDelivr CDN cache Purge the cache of a @latest or...

  2. // 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("scroll", ScrollTrigger.update);

  3. locomotive-scroll CDN by jsDelivr - A free, fast, and reliable Open Source CDN for npm and GitHub.

    • Locomotive Scroll
    • Usage
    • Instance options
    • Instance methods
    • Progressive playing animations example (like gsap)
    • Browser support
    • Who's using Locomotive Scroll?

    Detection of elements in viewport & smooth scrolling with parallax effects.

    Basic

    With simple detection.

    Smooth

    With smooth scrolling and parallax. Note: scroll-sections are optional but recommended to improve performance, particularly in long pages.

    Advanced

    Make it do what you want.

    Option Type Default Description

    el object document Scroll container element.

    name string 'scroll' Data attribute prefix (data-scroll-xxxx).

    offset array(2) [0,0] Global in-view trigger offset : [bottom,top]

    Use a string with % to use a percentage of the viewport height.

    Use a numeric value for absolute pixels unit.

    Method Description Arguments

    init() Reinitializes the scroll.

    on(eventName, function) Listen instance events ⬇.

    update() Updates all element positions.

    destroy() Destroys the scroll events.

    start() Restarts the scroll events.

    All data-scroll elements have a progress value. In the on scroll event you can get all current in-view elements.

    HTML

    Works on most modern browsers. Chrome, Firefox, Safari, Edge...

    To get IE 11 support, you need polyfills. You can use your own or include these before our script.

  4. Unfold All 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);

  5. Dec 16, 2020 · Locomotive scroll is a simple scroll library, built as a layer on top of ayamflow’s virtual-scroll, it provides smooth scrolling with support for parallax effects, toggling classes, and triggering event listeners when elements are in the viewport.

  6. People also ask

  7. A simple scroll library used by developers at Locomotive. Built as a layer on top of , it provides smooth scrolling with support for parallax effects, toggling classes, and triggering event listeners when elements are in the viewport.