Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function animateScroll() {
- var y = document.body.scrollTop;
- var z = ((Math.sin((y / scrollValue) * Math.PI) * -1 * (scrollValue/50)) - 1);
- if (document.body.scrollTop > 0) {
- window.scrollBy(0, z);
- setTimeout(animateScroll, 5);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement