Add onAnimate event