Author: | bhagabati-prasad |
---|---|
Views Total: | 1,161 views |
Official Page: | Go to website |
Last Update: | June 12, 2021 |
License: | MIT |
Preview:

Description:
An advanced smooth scroll JavaScript library that makes it possible to smoothly scroll the page to a specified point within the document, with configurable duration and optional easing effects.
How to use it:
1. Download and import the smooth-scroll.js JavaScript library.
<script src="./smooth-scroll.js"></script>
2. Scroll the page to a specific element.
smoothScroll('.section');
3. Config the duration of the animation.
smoothScroll('.section', 1000);
4. Apply an easing effect:
- easeInOutCirc
- linearTween
- easeInQuad
- easeOutQuad
- easeInCubic
- easeInOutQuad (Default)
smoothScroll('.section', 1000, 'easeInOutCirc');