summaryrefslogtreecommitdiffstats
path: root/src/js
diff options
context:
space:
mode:
authorDan Allen <dan@opendevise.com>2018-02-03 18:01:07 -0700
committerSarah White <sarah@opendevise.com>2018-02-04 22:25:04 +0000
commitb4f0a63f43452e93d9dac120fd1559d0e91fd9d6 (patch)
treef9b9f1f04e75935f67399fd5b8efb8542480b8c5 /src/js
parentdddda05c7286487d988bc51d76c714e42761c3cd (diff)
downloadalpine-antora-theme-b4f0a63f43452e93d9dac120fd1559d0e91fd9d6.tar.bz2
alpine-antora-theme-b4f0a63f43452e93d9dac120fd1559d0e91fd9d6.tar.xz
look for in-page links anywhere in page
- fixes the scroll offset when an in-page link in the site navigation is clicked
Diffstat (limited to 'src/js')
-rw-r--r--src/js/02-fragment-jumper.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/js/02-fragment-jumper.js b/src/js/02-fragment-jumper.js
index f680f75..e324227 100644
--- a/src/js/02-fragment-jumper.js
+++ b/src/js/02-fragment-jumper.js
@@ -28,7 +28,7 @@
window.removeEventListener('load', jumpOnLoad)
})
- Array.prototype.slice.call(document.querySelectorAll('.doc a[href^="#"]')).forEach(function (el) {
+ Array.prototype.slice.call(document.querySelectorAll('a[href^="#"]')).forEach(function (el) {
var hash, target
if ((hash = el.hash.slice(1)) && (target = document.getElementById(hash))) {
el.addEventListener('click', jumpToAnchor.bind(target))