mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-24 15:05:42 -05:00
fix selectors for toc
This commit is contained in:
parent
bb6ccfeba8
commit
06c4b11e8f
@ -27,8 +27,8 @@ function toggleToc(this: HTMLElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setupToc() {
|
function setupToc() {
|
||||||
const toc = document.getElementById("toc")
|
const buttons = document.querySelectorAll("button#toc") as NodeListOf<HTMLButtonElement>
|
||||||
if (toc) {
|
for (const toc of buttons) {
|
||||||
const collapsed = toc.classList.contains("collapsed")
|
const collapsed = toc.classList.contains("collapsed")
|
||||||
const content = toc.nextElementSibling as HTMLElement | undefined
|
const content = toc.nextElementSibling as HTMLElement | undefined
|
||||||
if (!content) return
|
if (!content) return
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user