/animescroll

Simple native scrollTo without dependencies.

Primary LanguageJavaScriptMIT LicenseMIT

AnimeScroll

Simple native scrollTo without dependencies.

Usage

Include in the .html file

<script src="dist/animescroll.js"></script>
animeScroll(to, duration, cb);

Scroll to [data-id="2"] elem.

animeScroll.to(document.querySelector(`[data-id="2"]`).offsetTop);

Source

Source