mirror of
https://github.com/helenclx/leilukin-site.git
synced 2025-04-11 10:32:42 +00:00
Apply sticky removal to the correct ToC element
This commit is contained in:
parent
dbe2f4896a
commit
1230880e84
@ -63,8 +63,8 @@
|
|||||||
// Remove the stickiness of the sidebar ToC if it is larger than screen height
|
// Remove the stickiness of the sidebar ToC if it is larger than screen height
|
||||||
function preventSidebarOverflow() {
|
function preventSidebarOverflow() {
|
||||||
if (document.documentElement.clientHeight < tocEl.offsetHeight + 50) {
|
if (document.documentElement.clientHeight < tocEl.offsetHeight + 50) {
|
||||||
tocEl.style.marginTop = "0";
|
tocWrapper.style.marginTop = "0";
|
||||||
tocEl.style.position = "static";
|
tocWrapper.style.position = "static";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
preventSidebarOverflow();
|
preventSidebarOverflow();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user