vendredi 24 janvier 2020

Remove the checkbox when deleting an item

There is a problem with the code:

  1. if I select elements, they are added to the .selected-items block; if I remove the checkbox in the upper row of elements, the elements disappear in the lower row but I want this to work in both directions, what would the element be when I click on the checkbox in the lower row disappeared from the bottom row and removed the checkbox from the corresponding element in the top row.
  2. I have a condition under which if there are more than 4 elements in the bottom row, an alert appears and the element is not added to the list, but the checkbox remains, how to cancel it if an alert appears?

Here is a code example.

https://codepen.io/annbin/pen/VwYRerL

enter image description here enter image description here




Aucun commentaire:

Enregistrer un commentaire