title: jQuery DataTables: how to filter DOM rows, when clicking checkboxes?
body: <p>I have prepared a simple test case for my question.</p>
  
  <p>Just save it to a disk and open in the browser - it will work instantly, you don't have to download or install anything.</p>
  
  <p>Here is the screenshot for my test case:</p>
  
  <p><img src="https://i.stack.imgur.com/ajr09.png" alt="screenshot"></p>
  
  <p><strong>My question is:</strong> how could I filter the rows in the table, when the user selects fruit and/or candy? What function to call here, fnDraw()?</p>
  
  <p>My test file <strong>index.html</strong>:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;style type="text/css" title="currentStyle"&gt;
          @import "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/themes/redmond/jquery-ui.css";
  &lt;/style&gt;
  
  &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="https://raw.github.com/DataTables/DataTables/master/media/js/jquery.dataTables.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  
  $(function() { 
          var my_table = $('#my_table').dataTable( {
              bJQueryUI: true,
              aoColumns: [
                  /* type */ { bVisible: false, bSearchable: false },
                  /* thing */ null
              ]
          });
  
          $(':checkbox').click(function() {
              alert('XXX what to do here? XXX');
          });
  });
  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;p&gt;What should be shown:&lt;/p&gt;
  &lt;p&gt;&lt;label&gt;&lt;input type="checkbox" value="fruit"&gt;fruit&lt;/label&gt;&lt;/p&gt;
  &lt;p&gt;&lt;label&gt;&lt;input type="checkbox" value="candy"&gt;candy&lt;/label&gt;&lt;/p&gt;
  
  &lt;table id="my_table"&gt;
  &lt;thead&gt;
  &lt;tr&gt;
  &lt;th&gt;Type&lt;/th&gt;
  &lt;th&gt;Thing&lt;/th&gt;
  &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
  &lt;tr&gt;&lt;td&gt;fruit&lt;/td&gt;&lt;td&gt;apple&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;fruit&lt;/td&gt;&lt;td&gt;banana&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;fruit&lt;/td&gt;&lt;td&gt;pear&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;candy&lt;/td&gt;&lt;td&gt;jelly&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;candy&lt;/td&gt;&lt;td&gt;toffee&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;candy&lt;/td&gt;&lt;td&gt;fudge&lt;/td&gt;&lt;/tr&gt;
  &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Thank you for any hints!</p>
  
  <p><strong>UPDATE:</strong> I've asked at <a href="http://datatables.net/forums/discussion/7298/dom-filtering-when-clicking-on-a-checkbox" rel="nofollow noreferrer">the DataTables forum</a> too.</p>