Using animationend event instead of timeout for the afterripple event