update JS animation