Skip to content
This repository was archived by the owner on Apr 29, 2022. It is now read-only.

Commit e09f78a

Browse files
authored
Scroll to the anchor, if given, after processing the TOC. (#1384)
Fixes #1380.
1 parent 69f3956 commit e09f78a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

assets/js/generate_toc_for_cms.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ function addTOC() {
3131
});
3232
toc += "</ul>" + "</p>";
3333
div_toc.replaceWith(toc);
34+
$(document).scrollTop( $($(location).attr("hash")).offset().top );
3435
}
3536
$(document).ready(addTOC);

0 commit comments

Comments
 (0)