Checkboxes + Jquery hide/show
<p>I have a series of a series of rows and checkboxes to filter them:</p>

<pre><code>&lt;ul&gt; 
&lt;li&gt;&lt;input id="type-A" type="checkbox" checked="checked"&gt; &lt;a href="/A"&gt;A&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;input id="type-B" type="checkbox" checked="checked"&gt; &lt;a href="/B"&gt;B&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;input id="type-C" type="checkbox" checked="checked"&gt; &lt;a href="/C"&gt;C&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;input id="type-D" type="checkbox" checked="checked"&gt; &lt;a href="/D"&gt;D&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;input id="type-E" type="checkbox" checked="checked"&gt; &lt;a href="/E"&gt;E&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;input id="type-F" type="checkbox" checked="checked"&gt; &lt;a href="/F"&gt;F&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;table&gt;
&lt;tr class="A"&gt;filler&lt;/tr&gt;
&lt;tr class="B"&gt;filler&lt;/tr&gt;
&lt;tr class="A B"&gt;filler&lt;/tr&gt;
&lt;tr class="C D"&gt;filler&lt;/tr&gt;
&lt;tr class="A F"&gt;filler&lt;/tr&gt;
&lt;tr class="A E F"&gt;filler&lt;/tr&gt;
&lt;tr class="F"&gt;filler&lt;/tr&gt;
&lt;tr class="C D E"&gt;filler&lt;/tr&gt;
&lt;tr class="A B C D E F"&gt;filler&lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>I'd like to hide/show rows based on what is checked. Currently I'm using (with the help from this previous question: <a href="http://stackoverflow.com/questions/4081576/use-this-to-simplify-code-simple-jquery">Use "this" to simplify code (simple jQuery)</a> ):</p>

<pre><code>$(function(){
  $("input[id^='type-']").change(function() {
    $("."+this.id.replace('type-','')).toggle(this.checked);
  }).change(); 
});
</code></pre>

<p>Which toggles what is shown every time a box is clicked and works great if each row only has one class. But they don't. How it's set up now, the order of clicking changes the rows that are shown. So I need to create a function that checks which checkboxes are checked and shows the rows that contain any of them. I'm not opposed to adding a button to make this happen.</p>

<p>I'd appreciate any help (and the direction to resources that could help me learn) you guys could give me!</p>
