Update 1.js
This commit is contained in:
+9
-2
@@ -246,10 +246,17 @@ window.addEventListener("scroll", () => {
|
||||
|
||||
/*when the window is reloading or loading*/
|
||||
window.addEventListener('load', function() {
|
||||
requestAnimationFrame(() => {
|
||||
const targetElement = document.getElementById('container_1');
|
||||
targetElement.scrollIntoView();
|
||||
if (targetElement) {
|
||||
targetElement.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||
}
|
||||
});
|
||||
|
||||
const sidebarCheckbox = document.getElementById('sidebar-active');
|
||||
if (sidebarCheckbox.checked) {sidebarCheckbox.checked = false;}
|
||||
if (sidebarCheckbox && sidebarCheckbox.checked) {
|
||||
sidebarCheckbox.checked = false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user