Show/Hide row in a table using checkboxes
<p>This is a page I am working on to show all the hacking Programs for Infinity (the miniature wargame).</p>

<p><a href="http://wargames.malgol.se/infinity/hacking/" rel="nofollow">http://wargames.malgol.se/infinity/hacking/</a></p>

<p>The function I'm looking for is by clicking the various checkbox under HACKING DEVICE: and UPGRADE: I want the table rows connected to them be displayed and the connecting icons for it. If I for example check "Hacking Device Plus", all the rows and programs connected to it will show up and they will all have the light green "square" show up in the Device column and if select more checkbox and more then one Hacking Device have the same row both "squares" will be shown.</p>

<p>If none of the checkbox are selected all the rows will be shown.</p>

<p>What I also want is every odd and even row to have a different colour. Now I am using this to change colour but it I can't get it to work with the solution I found here to change the active row colour (see below).</p>

<pre><code>table#hackingTable tr:nth-child(odd) td {background:#303030;color:#F7F7F7;}
table#hackingTable tr:nth-child(even) td {background:#404040;color:#F7F7F7;}
</code></pre>

<p>For the active row to change colour I tried the solution I found here. 
<a href="http://Tip://stackoverflow.com/questions/19970983/change-background-color-of-a-table-row-on-click" rel="nofollow">Tip://stackoverflow.com/questions/19970983/change-background-color-of-a-table-row-on-click</a></p>

<p>I have though about using the same solution to hide rows that aren't checked but after testing to just hide the css I used for odd/even colour didn't work since it could turn up the same colour next to each other when I hide the row in the middle.</p>

<p>Right now I am using class to show what row is connected to what hacking Device and Update.</p>

<pre><code>&lt;tr class="hdRow hdpRow"&gt;
</code></pre>

<p>And this is the code I use for all the squares.</p>

<pre><code>    &lt;td&gt;
        &lt;div class="cube hdCube"&gt;&lt;/div&gt;
        &lt;div class="cube hdpCube"&gt;&lt;/div&gt;
    &lt;/td&gt;
</code></pre>

<p>I hope I'm more clear of what I want now then I was the last time I asked something here. =)</p>