Skip to content

Commit

Permalink
Fixing script
Browse files Browse the repository at this point in the history
  • Loading branch information
choldgraf committed May 20, 2022
1 parent e0846ba commit 44cd965
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sphinx_book_theme/assets/scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var toggleFullScreen = () => {
* the screen.
*/
var scrollToActive = () => {
var navbar = document.getElementById("site-navigation");
var navbar = document.querySelector("#site-navigation .bd-sidebar__content");
var active_pages = navbar.querySelectorAll(".active");
var active_page = active_pages[active_pages.length - 1];
// Only scroll the navbar if the active link is lower than 50% of the page
Expand Down

0 comments on commit 44cd965

Please sign in to comment.