website/js/index.js
forgejo-actions a9fdbd6b5d generated
2024-01-09 21:53:27 +00:00

7 lines
No EOL
315 B
JavaScript

function toggleTableOfContent(e) {
const toc = document.getElementById('TableOfContents');
toc.classList.toggle("show");
const extend = toc.parentElement.getElementsByClassName("extend")[0];
extend.children[0].classList.toggle("icon-angle-right");
extend.children[0].classList.toggle("icon-angle-left");
}