Skip to content

Commit

Permalink
Appending TODO List at Start instead of End.
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhijitkr committed Sep 1, 2023
1 parent 8a1477a commit fff0fe1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,11 @@ function addItemToUI(itemId, item, checked) {
li.classList.add('myCheck');
}

li.appendChild(checkbox);
li.appendChild(label);
ul.appendChild(li);
li.insertAdjacentElement('afterbegin', checkbox);
li.insertAdjacentElement('afterbegin', label);
ul.insertAdjacentElement('afterbegin', li);

// Apply animation to the newly added item
// Apply animation to the newly added
li.classList.add('animation');
}

Expand Down

0 comments on commit fff0fe1

Please sign in to comment.