From d9ef8a652594c782be0422184a8632588805db06 Mon Sep 17 00:00:00 2001 From: altaf-creator Date: Sun, 10 Dec 2023 09:14:47 +0700 Subject: Added store page for simpliCity, tank shooter not finished --- scripts/onload.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'scripts/onload.js') 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 += "\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 +} -- cgit v1.2.3