only add clickable nav links to h2s
This commit is contained in:
parent
c58a70bc73
commit
0d71757b79
1 changed files with 4 additions and 6 deletions
|
@ -1,8 +1,6 @@
|
||||||
document.addEventListener('DOMContentLoaded', (event) => {
|
document.addEventListener('DOMContentLoaded', (event) => {
|
||||||
for (let i = 2; i < 7; i++) {
|
let headers = dgtn(`h2`);
|
||||||
let headers = dgtn(`h${i}`);
|
|
||||||
Object.values(headers).forEach((header) => {
|
Object.values(headers).forEach((header) => {
|
||||||
header.innerHTML += `<a class='post-nav-link' aria-hidden='true' href='#${header.id}'>#</a>`;
|
header.innerHTML += `<a class='post-nav-link' aria-hidden='true' href='#${header.id}'>#</a>`;
|
||||||
})
|
})
|
||||||
}
|
|
||||||
});
|
});
|
Loading…
Reference in a new issue