modify the scroll problem

make the scroll in che callback function of animate