NavBar & SideBar Works... Kinda. Not Customized Yet.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
document.addEventListener('click', (event) => {
|
||||
// Check if the clicked item (or its parent) is the toggle button
|
||||
const toggleBtn = event.target.closest('#sidebar-toggle');
|
||||
|
||||
if (toggleBtn) {
|
||||
const sidebar = document.querySelector('.sidebar');
|
||||
if (sidebar) {
|
||||
sidebar.classList.toggle('sidebar--open');
|
||||
} else {
|
||||
console.error('Sidebar element (.sidebar) not found in the DOM.');
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user