Answer the question
In order to leave comments, you need to log in
CSS transitions and JavaScript
Good afternoon.
Suppose that there is a task to animate an object on the page, and then perform some action.
In the past, when JS was used to animate elements, you could use jQuery's action queue like $('#foo').slideUp().fadeIn();
What to do now that we have CSS transitions and want to use them?
For example, I add a class that collapses an element vertically and after that I would remove it from the DOM. The only thing that comes to my mind is to make setTimeout for a time, a little more than in transition. But if I suddenly want the animation to be slower, I will have to edit the JS too.
Are there any options to more elegantly perform this kind of manipulation?
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question