Vue.js call transition explicitly Vue.js call transition explicitly vue.js vue.js

Vue.js call transition explicitly


It won't animate (shake) again since the element already has the class. You need to remove it first.

There are probably a couple of ways to accomplish this, using setTimeout to set animate to false is a very easy approach.

Using Vue's class binding (ex. :class="{'bounce animated': animated}"), run the animation by setting the animated property to true, then remove the class the animation by setting it back to false after the amount of time it takes to finish.

Here is a fiddle with exactly what you want to do, using setTimeout to set animate back to false after a 1s animation.

https://jsfiddle.net/crabbly/xcLrbtzj/