|
|
|
|
@ -25,3 +25,11 @@ for (const deleteButton of deleteButtons) {
|
|
|
|
|
event.target.parentNode.remove()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const addButtons = document.querySelectorAll('button.add');
|
|
|
|
|
for (const addButton of addButtons) {
|
|
|
|
|
addButton.addEventListener('click', (event)=>{
|
|
|
|
|
const template = document.querySelector('template').content.children[0];
|
|
|
|
|
event.target.parentNode.children[0].appendChild(template.cloneNode(true))
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|