Animate.css - Wait for animation to finish before continuing

后端 未结 2 2028
独厮守ぢ
独厮守ぢ 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条回答
  •  旧时难觅i
    2021-01-27 12:30

    There's no cross-browser way to do this except for setting a timeout.

    setTimeout($('#myDiv').empty, 500);
    

    There are some browser-prefixed methods for this, but I think I remember them being unreliable. See this SO question: Callback on CSS transition

提交回复
热议问题