Smooth Animated Vertical Scroll Effect with Pure JavaScript – AnimateScroll.js

Category: Animation , Javascript | June 13, 2016
Author:sunmockyang
Views Total:3,066 views
Official Page:Go to website
Last Update:June 13, 2016
License:MIT

Preview:

Smooth Animated Vertical Scroll Effect with Pure JavaScript – AnimateScroll.js

Description:

AnimateScroll.js is a lightweight JavaScript library for animating page scrolling to desired point smoothly.

How to use it:

Add the AnimateScroll.js JavaScript file into your webpage.

<script src="AnimateScroll.js"></script>

Usage.

  • element: Specifies the DOM element to scroll to
  • duration: How long the scroll animation lasts in milliseconds. Default: 0.
  • easing: Easing type for scroll animation. See below for options Default: linear. (string)
  • padding: How much space in pixels from the top of the specified element to scroll to. Default: 0
  • onFinish: Callback function to run when the animation is finished or cancelled.
animateScroll(element, duration, easing, padding, onFinish)

Changelog:

06/13/2016

  • Target argument can be either element or number

You Might Be Interested In:


Leave a Reply