1.0.1 • Published 6 years ago
animescroll v1.0.1
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);