scroll-to-y

1.0.1 • Public • Published

Scroll to y

var scrollToY = require('scroll-to-y');

// scrollToY(scrollTargetY, speed, easing);
// 
// scrollTargetY: the target scrollY property of the window
// speed: time in pixels per second
// easing: easing equation to use

scrollToY(0, 1500, 'easeInOutQuint');

Easing Equations

  • easeOutSine
  • easeInOutSine
  • easeInOutQuint

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i scroll-to-y

      Weekly Downloads

      10

      Version

      1.0.1

      License

      MIT

      Last publish

      Collaborators

      • jbraithwaite