more work starting 2.9
This commit is contained in:
8
snippetbox/ui/static/js/main.js
Executable file
8
snippetbox/ui/static/js/main.js
Executable file
@@ -0,0 +1,8 @@
|
||||
var navLinks = document.querySelectorAll("nav a");
|
||||
for (var i = 0; i < navLinks.length; i++) {
|
||||
var link = navLinks[i]
|
||||
if (link.getAttribute('href') == window.location.pathname) {
|
||||
link.classList.add("live");
|
||||
break;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user