Add toggle toc button
This commit is contained in:
1 parent
2b5999616d
commit
98c3c64499
3 files changed
+29
-5
No files matched your search
+8
-2
@@ -65,12 +65,18 @@ const showContent = () => {
|
||||
document.getElementById('bg-img').classList.remove('show-bg-img');
|
||||
}
|
||||
|
||||
// Toggle TOC
|
||||
//
|
||||
const toggleToc = () => {
|
||||
document.getElementById('toc').classList.toggle('show-toc');
|
||||
}
|
||||
|
||||
if (haveHeader == true) {
|
||||
document.getElementById('menu-btn').addEventListener('click', mobileMenuToggle);
|
||||
|
||||
|
||||
window.addEventListener('scroll', throttle(() => {
|
||||
autoHideHeader();
|
||||
|
||||
|
||||
if (mobileMenuVisible == true) {
|
||||
mobileMenuToggle();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user