From b3be41d58ab77f750d2dce615d68d98c1c21ec47 Mon Sep 17 00:00:00 2001 From: VAISHNAVI NIGAM Date: Sat, 9 Nov 2024 22:01:34 +0530 Subject: [PATCH] Update DIgital.html --- DIgital.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/DIgital.html b/DIgital.html index df2ee61b..0ec3917e 100644 --- a/DIgital.html +++ b/DIgital.html @@ -228,6 +228,14 @@ } window.onload = loadMedia; // Call loadMedia on window load + window.onscroll = function () { + const backToTopButton = document.getElementById('back-to-top'); + if (document.documentElement.scrollTop > 300) { + backToTopButton.style.display = 'block'; + } else { + backToTopButton.style.display = 'none'; + } + };