i have a quick questions seems like i’m able to have some transitions on my list items when i click the add List button. So it does the fade in, but when im closing the list items it wont work on fade-out. (using keyframes one for each transition for fade-in, fade-out). So first i wanted to try two different approaches.
The long way with creating elements from scratch.
with insertAdjacentHTML.
but both dont seem to work on the close button, wont do the fade-out effect.
for the close btn im using event delegation. so not sure if that is the problem on adding the class fade-out, that is were its not working.
Here is the basic layout as well the codepen link.
Hi @lasjorg i have read what you wanted me to do, but seems like its not working for some reason as far as the transition its concern, the setTimeout its working but not the transition, this is the code that i have so far not sure and updated codepen as well. I’m missing something or maybe not sure, if its what you are asking.
So it seems i finally have it right!!! so it seems that the setTimeout works as a perfect timing. I supposed to wrap it with this following code removing the li list, this gives time for the code line to be executed. and then add and remove the transition, that works perfect.