Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function scrollFunction() {
- document.getElementById("myBtn").style.display = "none";
- if (document.body.scrollTop > 1000 || document.documentElement.scrollTop > 1000) {
- document.getElementById("myBtn").style.display = "block";
- }
- }
- // When the user clicks on the button, scroll to the top of the document
- function topFunction() {
- document.body.scrollTop = 0;
- document.documentElement.scrollTop = 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement