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