Depending on different types, two types of events will be triggered during animation playback:
1. AnimationEvent
2. TransitionEvent
The two implementations of the animation end event are:
1. animationend
2. transitionend
The Demo page is here, only Chrome has been tested: http://codepen.io/longtian/pen/jEyrzN
For big compatibility pitfalls, you can see this part of the source code of AngularUI https://github.com/angular-ui/bootstrap/blob/7512b93fecb6f27df4f5aeba4c756c0c36aebbf2/src/transition/transition.js#L59
To hide this, you can set opacity: 0
We can set the default opacity=0 for an element
Put the animation on each class, and then assign this class to this attribute
Is JavaScript acceptable without jQUery?
Depending on different types, two types of events will be triggered during animation playback:
1. AnimationEvent
2. TransitionEvent
The two implementations of the animation end event are:
1. animationend
2. transitionend
The Demo page is here, only Chrome has been tested:
http://codepen.io/longtian/pen/jEyrzN
For big compatibility pitfalls, you can see this part of the source code of AngularUI
https://github.com/angular-ui/bootstrap/blob/7512b93fecb6f27df4f5aeba4c756c0c36aebbf2/src/transition/transition.js#L59
You can use js timer. Just set the timer time to be the same as the css animation time
http://jsfiddle.net/fevwehk3/