Animated scrollTo

Vanilla JS plugin for animated scrolling

Usage

scrollHelper.scrollTo(target,duration[,options]);

target

Target DOM element (destination of scrolling)

duration

Duration of the scroll animation (ms)

options

  • container: Scrollable DOM element for nested scrolling
  • onAfter: A callback triggered when the animation ends