Finished Version 3
This commit is contained in:
2
interface/static/js/jquery.js
vendored
Normal file
2
interface/static/js/jquery.js
vendored
Normal file
File diff suppressed because one or more lines are too long
13
interface/static/js/script.js
Normal file
13
interface/static/js/script.js
Normal file
@ -0,0 +1,13 @@
|
||||
const menuItems = document.getElementsByClassName("nav-link");
|
||||
for(let i = 0; i< menuItems.length; i++) {
|
||||
if(menuItems[i].pathname == window.location.pathname) {
|
||||
menuItems[i].classList.add("active")
|
||||
}
|
||||
}
|
||||
const dropdownItems = document.getElementsByClassName("dropdown-item");
|
||||
for(let i = 0; i< dropdownItems.length; i++) {
|
||||
if(dropdownItems[i].pathname == window.location.pathname) {
|
||||
dropdownItems[i].classList.add("active")
|
||||
$( "#" + dropdownItems[i].id ).closest( ".dropdown" ).find(".dropdown-toggle").addClass("active")
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user