I followed the code examples using the component annimation in a click even

I followed the code examples using the component annimation in a click event listener but it seem like the effect only works the first time the button is clicked. Do I have to reset the annimation or something?

there is no need to reset… maybe you can look at the demo (Demo button on this page) application and use the code there (check out the ‘Show Code’ button).