title: Filter with CLASS and Javascript
body: <p>I'm trying to make a filter on a table but it doesn't want to work at all.</p>
  
  <p>This is what i have so far.</p>
  
  <p>This must all run on the same page without external stuff (if it's possible)</p>
  
  <p><strong>This is my Javascript part:</strong></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
   $(document).load(function () {
     $('#SoortFilter').change(function () {
       $(".all-sc").hide();
       $("." + $(this).find(":selected").attr("id")).show();
     });
   });
  
    $(document).load(function () {
     $('#OnderwerpFilter').change(function () {
       $(".all-oc").hide();
       $("." + $(this).find(":selected").attr("id")).show();
     });
   });
  
    $(document).load(function () {
     $('#GraadFilter').change(function () {
       $(".all-gc").hide();
       $("." + $(this).find(":selected").attr("id")).show();
     });
   });
  
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>This is my HTML part:</strong></p>
  
  <pre><code>&lt;div class="myTable"&gt;
  
  &lt;table&gt;&lt;tr&gt;
  
  &lt;td&gt;Sorteer op soort:&lt;br&gt;&lt;select size="1" id="SoortFilter"&gt;
  &lt;option id="all-sc"&gt;Alles tonen&lt;/option&gt;
  &lt;option id="SC1"&gt;Opwarming&lt;/option&gt;
  &lt;option id="SC2"&gt;Oefening&lt;/option&gt;
  &lt;option id="SC4"&gt;Andere&lt;/option&gt;
  &lt;/select&gt;&lt;/td&gt;
  
  &lt;td&gt;Sorteer op onderwerp:&lt;br&gt;&lt;select size="1" id="OnderwerpFilter"&gt;
  &lt;option id="all-oc"&gt;Alles tonen&lt;/option&gt;
  &lt;option id="OC11"&gt;Voetenwerk algemeen&lt;/option&gt;
  &lt;option id="OC21"&gt;Tactiek dubbel&lt;/option&gt;
  &lt;option id="OC23"&gt;Wedstrijd analyse&lt;/option&gt;
  &lt;/select&gt;&lt;/td&gt;
  
  &lt;td&gt;Sorteer op graad:&lt;br&gt;&lt;select size="1" id="GraadFilter"&gt;
  &lt;option id="all-gc"&gt;Alles tonen&lt;/option&gt;
  &lt;option id="GC2"&gt;Gemakkelijk&lt;/option&gt;
  &lt;option id="GC3"&gt;Gemiddeld&lt;/option&gt;
  &lt;option id="GC4"&gt;Moeilijk&lt;/option&gt;
  &lt;option id="GC6"&gt;Variabel&lt;/option&gt;
  &lt;/select&gt;&lt;/td&gt;
  
  &lt;/tr&gt;&lt;/table&gt;
  
  &lt;/div&gt;
  
  
  &lt;div class="myTable"&gt;&lt;table id="myTable"&gt;
  
           &lt;tr&gt;
           &lt;td&gt;ID&lt;/td&gt;
           &lt;td&gt;&lt;img src="check.png" width="20" height="20"&gt;&lt;img src="wait.png" width="20" height="20"&gt;&lt;/td&gt;
           &lt;td&gt;Soort&lt;/td&gt;
           &lt;td&gt;Onderwerp&lt;/td&gt;
           &lt;td&gt;Graad&lt;/td&gt;
           &lt;td&gt;Benaming&lt;/td&gt;
           &lt;td&gt;URL&lt;/td&gt;
           &lt;/tr&gt;
  
           &lt;tr class="all-sc all-oc all-gc SC1 OC11 GC6"&gt;
           &lt;td&gt;4&lt;/td&gt;
           &lt;td&gt;&lt;img src="check.png" width="20" height="20"&gt;&lt;/td&gt;
           &lt;td&gt;Opwarming&lt;/td&gt;
           &lt;td&gt;Voetenwerk algemeen&lt;/td&gt;
           &lt;td&gt;Variabel&lt;/td&gt;
           &lt;td&gt;Agility oefeningen&lt;/td&gt;
           &lt;td&gt;&lt;a target="_blank"  href=https://www.youtube.com/watch?v=67XP-AekUoA&gt;https://www.youtube.com/watch?v=67XP-AekUoA&lt;/td&gt;
           &lt;/tr&gt;
  
           &lt;tr class="all-sc all-oc all-gc SC2 OC11 GC2"&gt;
           &lt;td&gt;8&lt;/td&gt;
           &lt;td&gt;&lt;img src="check.png" width="20" height="20"&gt;&lt;/td&gt;
           &lt;td&gt;Oefening&lt;/td&gt;
           &lt;td&gt;Voetenwerk algemeen&lt;/td&gt;
           &lt;td&gt;Gemakkelijk&lt;/td&gt;
           &lt;td&gt;Splitstep - fundamentals - Kyo groen&lt;/td&gt;
           &lt;td&gt;&lt;a target="_blank"  href=https://drive.google.com/file/d/0B0NYVs9pQgGSZzhCQXg3dnFfYUE/edit?pref=2&amp;pli=1&gt;https://drive.google.com/file/d/0B0NYVs9pQgGSZzhCQXg3dnFfYUE/edit?pref=2&amp;pli=1&lt;/td&gt;
           &lt;/tr&gt;
  
           &lt;tr class="all-sc all-oc all-gc SC2 OC11 GC3"&gt;
           &lt;td&gt;11&lt;/td&gt;
           &lt;td&gt;&lt;img src="check.png" width="20" height="20"&gt;&lt;/td&gt;
           &lt;td&gt;Oefening&lt;/td&gt;
           &lt;td&gt;Voetenwerk algemeen&lt;/td&gt;
           &lt;td&gt;Gemiddeld&lt;/td&gt;
           &lt;td&gt;Vertrek vanuit de basis&lt;/td&gt;
           &lt;td&gt;&lt;a target="_blank"  href=https://www.youtube.com/watch?v=WNgt6P_RDLc&gt;https://www.youtube.com/watch?v=WNgt6P_RDLc&lt;/td&gt;
           &lt;/tr&gt;
  
           &lt;tr class="all-sc all-oc all-gc SC2 OC21 GC4"&gt;
           &lt;td&gt;23&lt;/td&gt;
           &lt;td&gt;&lt;img src="check.png" width="20" height="20"&gt;&lt;/td&gt;
           &lt;td&gt;Oefening&lt;/td&gt;
           &lt;td&gt;Tactiek dubbel&lt;/td&gt;
           &lt;td&gt;Moeilijk&lt;/td&gt;
           &lt;td&gt;Lee Bok - Positiespel dubbel&lt;/td&gt;
           &lt;td&gt;&lt;a target="_blank"  href=https://www.youtube.com/watch?v=XMYbU08AOaw&amp;feature=youtu.be&gt;https://www.youtube.com/watch?v=XMYbU08AOaw&amp;feature=youtu.be&lt;/td&gt;
           &lt;/tr&gt;
  
           &lt;tr class="all-sc all-oc all-gc SC4 OC23 GC6"&gt;
           &lt;td&gt;14&lt;/td&gt;
           &lt;td&gt;&lt;img src="check.png" width="20" height="20"&gt;&lt;/td&gt;
           &lt;td&gt;Andere&lt;/td&gt;
           &lt;td&gt;Wedstrijd analyse&lt;/td&gt;
           &lt;td&gt;Variabel&lt;/td&gt;
           &lt;td&gt;Londen 2012 - Heren dubbel - halve finale&lt;/td&gt;
           &lt;td&gt;&lt;a target="_blank"  href=https://www.youtube.com/watch?v=uKj4S9ig7c8&gt;https://www.youtube.com/watch?v=uKj4S9ig7c8&lt;/td&gt;
           &lt;/tr&gt;
  
           &lt;tr class="all-sc all-oc all-gc SC4 OC23 GC6"&gt;
           &lt;td&gt;15&lt;/td&gt;
           &lt;td&gt;&lt;img src="check.png" width="20" height="20"&gt;&lt;/td&gt;
           &lt;td&gt;Andere&lt;/td&gt;
           &lt;td&gt;Wedstrijd analyse&lt;/td&gt;
           &lt;td&gt;Variabel&lt;/td&gt;
           &lt;td&gt;Londen 2012 - Heren enkel - finale&lt;/td&gt;
           &lt;td&gt;&lt;a target="_blank"  href=https://www.youtube.com/watch?v=ytjD4f_I0sc&gt;https://www.youtube.com/watch?v=ytjD4f_I0sc&lt;/td&gt;
           &lt;/tr&gt;
  
  
  &lt;/table&gt;&lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>