diff --git a/JAVASCRIPT/1.js b/JAVASCRIPT/1.js index f04357d..8c03b65 100644 --- a/JAVASCRIPT/1.js +++ b/JAVASCRIPT/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*/