mirror of
https://github.com/SpikeHD/MojoFrontend.git
synced 2024-11-16 07:29:23 +00:00
add onload file
This commit is contained in:
parent
052e13f469
commit
19a176bdfd
7
scripts/onload.js
Normal file
7
scripts/onload.js
Normal file
@ -0,0 +1,7 @@
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const sidebarItems = document.querySelector("#sidebar").children;
|
||||
|
||||
for (const item of sidebarItems) {
|
||||
item.onclick = (e) => switchPage(e.target.dataset.value)
|
||||
}
|
||||
})
|
Loading…
Reference in New Issue
Block a user