0
0
Fork 0

The beginnings.

This commit is contained in:
Tyler-A 2019-09-10 01:00:05 -06:00
parent cec2d56eca
commit 4615c296b3
3 changed files with 83 additions and 0 deletions

10
js/add_choice.js Normal file
View file

@ -0,0 +1,10 @@
const add_choice = () => {
let index = document.getElementsByClassName("choice").length;
let choice_div = document.getElementById("choice-template");
let clone = choice_div.content.cloneNode(true);
clone.childNodes[1].childNodes[1].id = `text-in-${index}`;
clone.childNodes[1].childNodes[3].id = `weight-in-${index}`;
document.getElementById("choices").appendChild(clone);
}