animate line with slider