Animate.css - Wait for animation to finish before continuing

后端 未结 2 2027
独厮守ぢ
独厮守ぢ 2021-01-27 11:56

I\'m currently using Animate.css for animation around the app I\'m creating. I\'m looking for a way to wait for the animation to finish before continuing. Here\'s what I thought

2条回答
  •  长情又很酷
    2021-01-27 12:33

    If this is about CSS animations then this

    $("#myDiv").addClass("animated flipOutY")
               .on('animationend webkitAnimationEnd MSAnimationEnd oAnimationEnd', function(e) {
                  $(this). ...
               });
    

    If that animate.css uses actually transitions then you should use these events:

    'transitionend webkitTransitionEnd MSTransitionEnd oTransitionEnd'
    

提交回复
热议问题