Random duration

Random duration

Hi,

I'm aiming to animate a series of div boxes from left to right, in a race.

My ultimate goal, is to have it so the boxes can randomly speed up or slow down, like momentum.

For instance, a slow starting box could overtake to win the race, if the leader is randomly chosen to slow down.

Or the it could lose the race, if it overtook the leader (who slowed down) and then got faster again.

I was thinking it could be done via randomly generating new duration values on .animate, I don't know if that's good practice.

My code so far:  https://jsfiddle.net/kaye17zn/

Appreciate any comments/help.

Thanks