Finish css animation on click