title: Alternate color every two columns CSS/Javascript in a HTML table
body: <p>I have a table that has dynamic columns added to it by Javascript.
  I am looking for a way to alternate the background color of every two columns, such as:</p>
  
  <pre><code>&lt;table&gt;
    &lt;tr&gt;
      &lt;td&gt;FIRST BGCOLOR&lt;/td&gt;
      &lt;td&gt;FIRST BGCOLOR&lt;/td&gt;
      &lt;td&gt;SECOND BGCOLOR&lt;/td&gt;
      &lt;td&gt;SECOND BGCOLOR&lt;/td&gt;
      &lt;td&gt;FIRST BGCOLOR&lt;/td&gt;
      &lt;td&gt;FIRST BGCOLOR&lt;/td&gt;
      &lt;td&gt;SECOND BGCOLOR&lt;/td&gt;
      &lt;td&gt;SECOND BGCOLOR&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>So I know how to do alternate coloring with CSS (:nth-child(odd) etc..), but not how to have TWO columns the same color, then different color for the next two, and so on...</p>
  
  <p>How can this be acheived? Javascript or jQuery solutions are also welcomed as I am using those already in the project, but CSS would be preferrable of course.</p>
  
  <p>Thank you all!</p>