aboutsummaryrefslogtreecommitdiff
path: root/docs/_static
diff options
context:
space:
mode:
authorJosh B <[email protected]>2020-06-01 00:38:37 +1000
committerRapptz <[email protected]>2020-12-18 21:18:52 -0500
commit9e214feadcd9373c2435c37ba93e28ee582317c0 (patch)
tree78b02799601840cbd367e9587d34c0cc9d9bc615 /docs/_static
parentFirst pass at double header display (diff)
downloaddiscord.py-9e214feadcd9373c2435c37ba93e28ee582317c0.tar.xz
discord.py-9e214feadcd9373c2435c37ba93e28ee582317c0.zip
Fix sidebar active link selection
Diffstat (limited to 'docs/_static')
-rw-r--r--docs/_static/custom.js4
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');
}