9 lines
214 B
JavaScript
9 lines
214 B
JavaScript
window.onload = function() {
|
|
var links = document.querySelectorAll('.nav-link');
|
|
links.forEach(function(link) {
|
|
if (link.href === window.location.href) {
|
|
link.classList.add('active');
|
|
}
|
|
});
|
|
};
|
|
|