I've seen angular-animate able to detect when a CSS transaction is in progress or not to take certain actions.
I need to figure out how they do it!
Example:
#square{
background-color: tomato;
height: 100px;
width: 100px;
font-weight: bold;
color: white;
display: flex;
justify-content: center;
align-items: center;
font-family: sans-serif;
transition: background-color .2s linear, color 1s ease-out;
}
#square:hover{
background-color: white;
color: tomato;
}
<div id="square">
SQUARE
</div>
How do you detect the end of a transition of an animation in Pure Javascript ?
Replies with jQuery are not welcome: D