There is a problem with the code:
- 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. - 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
Aucun commentaire:
Enregistrer un commentaire