Change from .childNodes to .children
This commit is contained in:
parent
f188768402
commit
2776e10f80
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue