diff --git a/app.js b/app.js index 2049fc2..5f2be35 100644 --- a/app.js +++ b/app.js @@ -15,11 +15,11 @@ for(const element of lisAndBody){ element.addEventListener('drop', (event)=>{ event.stopPropagation() event.target.classList.remove('dragging'); - event.target.children[1].appendChild(currentDraggedItem) + event.target.children[0].appendChild(currentDraggedItem) }) } -const deleteButtons = document.querySelectorAll('button'); +const deleteButtons = document.querySelectorAll('button.delete'); for (const deleteButton of deleteButtons) { deleteButton.addEventListener('click', (event)=>{ event.target.parentNode.remove() diff --git a/index.html b/index.html index 51a6282..984470c 100644 --- a/index.html +++ b/index.html @@ -7,32 +7,41 @@
-