diff options
author | altaf-creator <athaalaa@gmail.com> | 2023-12-10 09:14:47 +0700 |
---|---|---|
committer | altaf-creator <athaalaa@gmail.com> | 2023-12-10 09:14:47 +0700 |
commit | d9ef8a652594c782be0422184a8632588805db06 (patch) | |
tree | 6acd6723c432b19f3763848d40f9909838b1046c /scripts/onload.js | |
parent | 186df2c71e361ad84bf66625d87fab41eac827a9 (diff) |
Added store page for simpliCity, tank shooter not finished
Diffstat (limited to 'scripts/onload.js')
-rw-r--r-- | scripts/onload.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/onload.js b/scripts/onload.js index 5c63f35..165f80d 100644 --- a/scripts/onload.js +++ b/scripts/onload.js @@ -3,6 +3,13 @@ function addNodes() { const container = document.getElementById("progressContainer"); for (var i = 0; i < collection.length; i++) { - container.innerHTML += "<nodes class=\"sidebar-progress-node\"></nodes>\n"; + var node = document.createElement("a"); + node.className = "node"; + container.appendChild(node); + if (collection.item(i).getAttribute('id') == null) { + collection.item(i).setAttribute('id', `section-${i}`); + } + node.setAttribute('id', `node-${i}`) + node.href = `#${collection.item(i).getAttribute('id')}` } -}
\ No newline at end of file +} |