JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 25
  • Score
    100M100P100Q40188F
  • License ISC

A handler for scrolling inside elements with different eases

Package Exports

  • scroll-manager

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (scroll-manager) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

scroll-manager

stable

A handler for scrolling inside elements with different eases

var ScrollManager = require('scroll-manager');

this.scoller = new ScrollManager();

this.scoller.scrollTo(element, offsetToScroll, duration, ease(optional));

//Examples

this.scoller.scrollTo(document.body, 0, 0.6);

this.scoller.scrollTo(document.body, 0, 0.6, 'easeOutCubic');

Available Eases

'easeLinear'
'easeInQuad'
'easeOutQuad'
'easeInOutQuad'
'easeInCubic'
'easeOutCubic'
'easeInOutCubic'

Note: If you dont choose any ease, easeLinear is going to be run.

Usage

NPM