We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a7d5574 + 73230ae commit 60de032Copy full SHA for 60de032
package.json
@@ -26,7 +26,7 @@
26
"homepage": "https://github.com/bit-docs/bit-docs-docjs-theme#readme",
27
"devDependencies": {
28
"bit-docs-generate-html": "^0.3.3",
29
- "bit-docs-html-toc": "^0.2.1"
+ "bit-docs-html-toc": "^0.4.0"
30
},
31
"dependencies": {
32
"jquery": "^3.1.1"
static/docjs.js
@@ -22,6 +22,15 @@ $(function() {
22
$el.prepend(anchorTemplate({ id: id }));
23
});
24
25
+ if (window.location.hash.length) {
+ var id = window.location.hash.replace("#", "");
+ var anchor = document.getElementById(id);
+
+ if (anchor) {
+ anchor.scrollIntoView(true);
+ }
33
34
function collectHeadings() {
35
return $(".content .comment h2, .content .comment h3");
36
}
0 commit comments