We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bff632 commit d435ce1Copy full SHA for d435ce1
script/script.js
@@ -2,7 +2,7 @@ const NAVBAR_LI_ELEMENTS = document.getElementById('navbar').firstElementChild.c
2
let flag = false;
3
4
5
-// rotate the arrow of <li> which matches the SITE_URL
+// check for a match with the <li> element and SITE_URL, then make it active
6
Array.from(NAVBAR_LI_ELEMENTS).forEach((liElement) => {
7
if (liElement.firstElementChild.href == location.href) {
8
liElement.classList.add('active');
@@ -11,5 +11,5 @@ Array.from(NAVBAR_LI_ELEMENTS).forEach((liElement) => {
11
}
12
})
13
14
-// if non of other is active the the Home tab is active
+// if no other tab is active, then the Home tab becomes active
15
if (!flag) NAVBAR_LI_ELEMENTS[0].classList.add('active');
0 commit comments