MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / scrollFunction

Function scrollFunction

assets/js/Scroll.js:4–10  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2window.onscroll = function() {scrollFunction()};
3
4function scrollFunction() {
5 if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
6 mybutton.style.display = "block";
7 } else {
8 mybutton.style.display = "none";
9 }
10}
11function topFunction() {
12 document.body.scrollTop = 0;
13 document.documentElement.scrollTop = 0;

Callers 1

Scroll.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected