I'm not looking to trigger a CSS animation from JS, but rather the opposite.
If I do a CSS animation via the -webkit-transition
or transition: all 1000ms
type style sheet, is there a way to trigger a JS function after the transition is done?
Basically I've been doing animations via javascript and I want to convert some of them to CSS animations, but I need to trigger javascript events after the animations have pleted.
I'm not looking to trigger a CSS animation from JS, but rather the opposite.
If I do a CSS animation via the -webkit-transition
or transition: all 1000ms
type style sheet, is there a way to trigger a JS function after the transition is done?
Basically I've been doing animations via javascript and I want to convert some of them to CSS animations, but I need to trigger javascript events after the animations have pleted.
Share Improve this question edited Dec 4, 2012 at 6:31 Mayur Birari 5,8358 gold badges36 silver badges61 bronze badges asked Dec 4, 2012 at 6:13 AlbertoAlberto 1361 silver badge5 bronze badges 3- 2 Similiar stackoverflow./questions/2087510/callback-on-css-transition – Musa Commented Dec 4, 2012 at 6:31
- Awesome I didn't find that before posting. I need to fully test it but it seems to fit my needs. – Alberto Commented Dec 4, 2012 at 7:17
- Does this answer your question? Callback on CSS transition – djvg Commented Mar 30, 2023 at 13:40
1 Answer
Reset to default 5box.addEventListener('webkitTransitionEnd', function( event ) {
alert( "Finished transition!" );
}, false );
See: Callback on CSS transition
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745153661a4613985.html
评论列表(0条)