website/static/js/site.js

10 lines
214 B
JavaScript
Raw Permalink Normal View History

2024-11-18 17:10:08 +02:00
window.onload = function() {
var links = document.querySelectorAll('.nav-link');
links.forEach(function(link) {
if (link.href === window.location.href) {
link.classList.add('active');
}
});
};