update js animation