how to loop through a column and set its cells to a class jquery
<p>I want to loop through the first column of my table and set the cells to red if odd and blue if even.
In the follwoing: cell containg a, c would be red, and b would blue.</p>

<pre><code>&lt;table class='sortable'&gt; 
    &lt;tr&gt; 
        &lt;td&gt;a&lt;/td&gt; 
        &lt;td&gt;d&lt;/td&gt; 
        &lt;td&gt;g&lt;/td&gt; 
    &lt;/tr&gt; 
    &lt;tr&gt; 
        &lt;td&gt;b&lt;/td&gt; 
        &lt;td&gt;e&lt;/td&gt; 
        &lt;td&gt;h&lt;/td&gt; 
    &lt;/tr&gt; 
    &lt;tr&gt; 
        &lt;td&gt;c&lt;/td&gt; 
        &lt;td&gt;f&lt;/td&gt; 
        &lt;td&gt;i&lt;/td&gt; 
    &lt;/tr&gt; 
&lt;/table&gt; 
</code></pre>
