js/bouncyscroll.min.js

1 line
362 B
JavaScript
Raw Normal View History

2022-05-16 19:35:48 +02:00
$(document).ready(function(){$("body").append('<div id="bounce_scroll_div"></div>'),$("#bounce_scroll_div").css({position:"absolute",width:"1px",height:"1px",overflow:"scroll","z-index":"100"}),setInterval(function(){$("#bounce_scroll_div").css("top",Math.sin((new Date).getTime()/250)*$(window).height()*4+$(document).scrollTop()+$(window).height()+"px")},1)});