/scroll-beizer

js function for scroll animating by using beizer curve

Primary LanguageJavaScript

Read Me

feel free to suggest by pull requests

function import

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);

prototype import

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);