fixed top scroll for footnotes clicks
This commit is contained in:
parent
41eead01de
commit
039f0b937b
2 changed files with 2 additions and 10 deletions
|
@ -64,20 +64,12 @@ window.addEventListener('DOMContentLoaded', (e) => {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
document.querySelectorAll('#TableOfContents a').forEach(i => {
|
document.querySelectorAll('#TableOfContents a, .anchorz, .footnote-backref, .footnote-ref').forEach(i => {
|
||||||
i.addEventListener('click', e => {
|
i.addEventListener('click', e => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.scrollBy({top: document.querySelector('.header').clientHeight * -1.25, behavior: 'smooth'})}, 50);
|
window.scrollBy({top: document.querySelector('.header').clientHeight * -1.25, behavior: 'smooth'})}, 50);
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
document.querySelectorAll('.anchorz').forEach(i => {
|
|
||||||
i.addEventListener('click', e => {
|
|
||||||
setTimeout(() => {
|
|
||||||
window.scrollBy({ top: document.querySelector('.header').clientHeight * -1.25, behavior: 'smooth' })
|
|
||||||
}, 50);
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
toggleAllLinks = function () {
|
toggleAllLinks = function () {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201207142206-ba2a130517be
|
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20201207150315-65923a609e55
|
||||||
|
|
Loading…
Add table
Reference in a new issue