javascript alternating row color when data change
<p>I want to add alternating colors to rows in a table, but instead of changing color every other row I want to switch color when the data in the first column changed compare to the row above. For example in the table below, the first two row would have the same color since the first fields are both "1", and the third row would have a different color. I'm looking for a solution without third-party libraries like jquery. </p>

<p><strong>1 | A<br>
1 | B</strong><br>
2 | C<br>
<strong>3 | D</strong><br>
4 | E   </p>
