M
M
mishapsv2016-07-29 12:06:46
css
mishapsv, 2016-07-29 12:06:46

How to run script before css transition starts?

Due to the fact that the css animation comes first, and the script is executed later, the page twitches (we smoothly open the block with the transition, and the script fixes the block in the center so that the opened content does not push the block header up).
If I put the script in the header of the page - everything is ok. But this is very undesirable, as you understand (the main script file is included before </body>).
How can I set the order of execution in this case?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DmitryRus, 2016-09-30
@DmitryRus

Wrap the current animation in a class, when you need to start the animation just add this class through js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question