Spaces:
Running
Running
File size: 766 Bytes
906851f b93a74d 906851f b93a74d 906851f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
document.addEventListener('DOMContentLoaded', () => {
// Set active menu item based on current page
const currentPage = window.location.pathname.split('/').pop() || 'index.html';
const menuItems = document.querySelectorAll('custom-sidebar a.menu-item');
menuItems.forEach(item => {
const href = item.getAttribute('href');
if (currentPage === href) {
item.classList.add('active');
} else {
item.classList.remove('active');
}
});
// Initialize tooltips
const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl);
});
});
|