I have around 26 html elements for which I want the following effect in JavaScript:

![animation](https://i.stack.imgur.com/5nIRA.gif)

Is it possible to make something like this?

I was trying to do it as follows:

```
var j = 2000;
        for (i = 1; i <= 26; i++) {
            setInterval(function() {document.getElementById('Q' + i).style.backgroundColor = '#00a300'}, j);
            setInterval(function() {document.getElementById('Q' + i).style.color = '#FFFFFF'}, j);
            j = j + j;
            setInterval(function() {document.getElementById('Q' + (i-1)).style.backgroundColor = '#e1e1e1'}, j);
            setInterval(function() {document.getElementById('Q' + (i-1)).style.color = '#666666'}, j);
        }

```

I am a novice with JavaScript and have never worked with timers.