feel free to suggest by pull requests
Use function.js
if you wish to use the scoll animation as function
. Don't forget to pass the element(HTMLElement
) that you want to scroll animate.
//can be any HTMLElement
var ele = document.getElementById('container');
// be sure to include target scroll and element
scrollTo( ele, 500);
Use prototype.js
if you wish to use the scroll animation as prototype function
to HTMLElement
.
//can be any HTMLElement
var ele = document.getElementById('container');
ele.ScrollTo(500);