1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-07 22:45:23 +02:00

Update table-of-content.js

This commit is contained in:
Taly 2022-07-07 18:46:57 +03:00
parent 8cf75b4c20
commit e1d80fa511

View file

@ -223,8 +223,8 @@ export default class TableOfContent {
/** /**
* Clear all links * Clear all links
*/ */
this.tocElement.querySelectorAll('.table-of-content__list-item').forEach((link) => { this.tocElement.querySelectorAll(this.CSS.tocElementItem).forEach((link) => {
link.classList.remove('table-of-content__list-item--active'); link.classList.remove(this.CSS.tocElementItemActive);
}); });
/** /**
@ -248,7 +248,7 @@ export default class TableOfContent {
* If target list item is found then highlight it * If target list item is found then highlight it
*/ */
if (listItem) { if (listItem) {
listItem.classList.add('table-of-content__list-item--active'); listItem.classList.add(this.CSS.tocElementItemActive);
} }
} }
} }