0
0
Fork 0

Change from .childNodes to .children

This commit is contained in:
Tyler-A 2019-09-10 18:53:14 -06:00
parent f188768402
commit 2776e10f80

View file

@ -4,8 +4,8 @@ const add_choice = () => {
let choice_div = document.getElementById("choice-template"); let choice_div = document.getElementById("choice-template");
let clone = choice_div.content.cloneNode(true); let clone = choice_div.content.cloneNode(true);
clone.childNodes[1].childNodes[1].id = `text-in-${index}`; clone.children[0].children[0].id = `text-in-${index}`;
clone.childNodes[1].childNodes[3].id = `weight-in-${index}`; clone.children[0].children[1].id = `weight-in-${index}`;
// Add to document without resetting the other ones // Add to document without resetting the other ones
document.getElementById("choices").appendChild(clone); document.getElementById("choices").appendChild(clone);