Answer the question
In order to leave comments, you need to log in
Is it possible to somehow animate the movement of a dom element when its neighbor is removed?
That's actually the question.
I am manipulating DOM elements through javascript. I delete one element, its neighbor on the right takes its place. How can I animate this movement without connecting third-party libraries? By animation, I mean just a smooth movement to a new place.
Tried the transition property, doesn't work because no properties change in css.
Answer the question
In order to leave comments, you need to log in
You can shrink the element that is being removed by 0px , then delete it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question