From e1574de7be15f186e21163e7ebb0bef764e2189e Mon Sep 17 00:00:00 2001 From: FURK4NGG <105324908+FURK4NGG@users.noreply.github.com> Date: Wed, 11 Sep 2024 14:08:01 +0300 Subject: [PATCH] Update 1.js --- JAVASCRIPT/tr/1.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/JAVASCRIPT/tr/1.js b/JAVASCRIPT/tr/1.js index e8f1700..8230480 100644 --- a/JAVASCRIPT/tr/1.js +++ b/JAVASCRIPT/tr/1.js @@ -92,9 +92,12 @@ window.addEventListener("scroll", () => { } }) +/*when the window is reloading or loading*/ window.addEventListener('load', function() { const targetElement = document.getElementById('container_1'); targetElement.scrollIntoView(); + const sidebarCheckbox = document.getElementById('sidebar-active'); + if (sidebarCheckbox.checked) {sidebarCheckbox.checked = false;} }); /*LOADING SCREEN*/