diff options
| author | Josh B <[email protected]> | 2020-06-01 00:38:37 +1000 |
|---|---|---|
| committer | Josh B <[email protected]> | 2020-06-01 00:38:37 +1000 |
| commit | 3c56240e5fcbee02e45f50e23f47a558b3800fdc (patch) | |
| tree | 8a761f92a024558c891ec974d78da635935331cb /docs | |
| parent | First pass at double header display (diff) | |
| download | discord.py-3c56240e5fcbee02e45f50e23f47a558b3800fdc.tar.xz discord.py-3c56240e5fcbee02e45f50e23f47a558b3800fdc.zip | |
Fix sidebar active link selection
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/_static/custom.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/_static/custom.js b/docs/_static/custom.js index 9b3ed5bc..ea3fbe27 100644 --- a/docs/_static/custom.js +++ b/docs/_static/custom.js @@ -61,7 +61,7 @@ Object.entries(settings).forEach(([name, setter]) => { document.addEventListener('DOMContentLoaded', () => { bottomHeightThreshold = document.documentElement.scrollHeight - 30; - sections = document.querySelectorAll('div.section'); + sections = document.querySelectorAll('section'); settingsModal = document.querySelector('div#settings.modal'); hamburgerToggle = document.getElementById("hamburger-toggle"); sidebar = document.getElementById("sidebar"); @@ -129,7 +129,7 @@ window.addEventListener('scroll', () => { } if (currentSection) { - activeLink = document.querySelector(`.sphinxsidebar a[href="#${currentSection.id}"]`); + activeLink = document.querySelector(`#sidebar a[href="#${currentSection.id}"]`); if (activeLink) { activeLink.parentElement.classList.add('active'); } |