Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 4
    Because you did not change the duration... }, 1000 * i); will do... Commented Aug 25, 2016 at 17:48
  • 1
    @Rayon, changing the duration alone does not prevent that the first fill statement is executed at the same time for all elements. Commented Aug 25, 2016 at 17:55
  • @trincot – I did not notice that... Good one ;) Commented Aug 25, 2016 at 17:59
  • Note that the "+1" inside the color array index is a bug. Indices start at 0 and go to length-1. You should better round the random*length. Commented Aug 25, 2016 at 18:30
  • Did any of the answers suit your needs? Could you accept one or leave a comment? Commented Sep 13, 2016 at 17:51