nit: This method is called when a "click" or "animationend" event occurs