From 970106ee8dad4c95fa02e1604168925f4d78207b Mon Sep 17 00:00:00 2001 From: Michel Tuboeuf Date: Sun, 24 Nov 2024 11:12:44 +0100 Subject: [PATCH] Supprimer scrolltotop.js --- scrolltotop.js | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 scrolltotop.js diff --git a/scrolltotop.js b/scrolltotop.js deleted file mode 100644 index 6876e06..0000000 --- a/scrolltotop.js +++ /dev/null @@ -1,24 +0,0 @@ -// scrolltotop.js - -// Execute a function when the window is being scrolled -window.onscroll = function () { scrollFunction() }; - -// When the user scrolls down 20px from the top of the document, show the button -function scrollFunction() { - // Get the button - var mybutton = document.getElementById("scrollToTopButton"); - - if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { - mybutton.style.opacity = 1; - mybutton.style.visibility = "visible"; - } else { - mybutton.style.opacity = 0; - mybutton.style.visibility = "hidden"; - } -} - -// When the user clicks on the button, scroll to the top of the document -function topFunction() { - document.body.scrollTop = 0; - document.documentElement.scrollTop = 0; -} \ No newline at end of file