mirror of
https://github.com/Pagwin-Fedora/website.git
synced 2025-07-17 22:45:42 +00:00
navigation done
This commit is contained in:
parent
0fc045068a
commit
1e46f34edb
1 changed files with 7 additions and 0 deletions
|
@ -0,0 +1,7 @@
|
|||
let elems = document.getElementsByTagName("h2");
|
||||
for(let e of elems){
|
||||
e.outerHTML = `<a href="./#${e.innerText}" id="${e.innerText}" name="${e.innerText}"><h2>#${e.innerHTML}</h2></a>`;
|
||||
document.getElementById(e.innerText).addEventListener('click',event=>{
|
||||
event.target.scrollIntoView();
|
||||
});
|
||||
}
|
Loading…
Reference in a new issue