update style and slide animation