html - CSS trigger javascript after transitionanimation - Stack Overflow

I'm not looking to trigger a CSS animation from JS, but rather the opposite.If I do a CSS animatio

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
Add a ment  | 

1 Answer 1

Reset to default 5
box.addEventListener('webkitTransitionEnd', function( event ) { 
     alert( "Finished transition!" ); 
}, false );

See: Callback on CSS transition

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745153661a4613985.html

相关推荐

  • html - CSS trigger javascript after transitionanimation - Stack Overflow

    I'm not looking to trigger a CSS animation from JS, but rather the opposite.If I do a CSS animatio

    2小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信