This should show you one way to do it, although doing it on mouse click may be difficult. I would recommend you place the animation in a unique style, and use the clicks event to apply the style dynamically.
This should show you one way to do it, although doing it on mouse click may be difficult. I would recommend you place the animation in a unique style, and use the clicks event to apply the style dynamically.