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

    • About Us

      jsDelivr is a free CDN (Content Delivery Network) for open...

    • Our History

      The jsDelivr team builds PerfOps, a commercial service to...

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

    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.

    Locomotive Scroll is a library that detects elements in viewport and scrolls them with parallax effects. It supports basic, smooth and advanced usage with options, methods and events.

  2. A simple scroll library used by developers at Locomotive. 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.

  3. www.npmjs.com › package › locomotive-scrolllocomotive-scroll - npm

    locomotive-scroll is a JavaScript library that detects elements in viewport and scrolls them with parallax effects. It supports basic, smooth and advanced usage with options, methods and events.

  4. ``` ```js import LocomotiveScroll from 'locomotive-scroll'; const scroll = new LocomotiveScroll(); scroll.on('call', func => { // Using modularJS this.call(...func); // Using jQuery events $(document).trigger(func); // Or do it your own way 😎 }); ``` ## Instance options | Option | Type | Default | Description ...

  5. Find out the best CDN to use with locomotive-scroll, a library for smooth scrolling and parallax effects. See the latest stable version, all versions and file CDN for locomotive-scroll.js.

  6. People also ask

  7. Loco (native) Scroll is a fork of locomotive-scroll that uses Lenis to achieve native but smooth scrolling without Smooth Class. It offers detection of elements in viewport, context management, methods, events and options for customization.

  1. People also search for