title: Column filter on button click in datatables
body: <p>Morning all, </p>
  
  <p>New to datatables, python and jquery so bear with me. I'm trying to get a datatables table imported through python to filter on column results on a button click.  I've searched for answers to this already, but most seem to be geared around text filters or selector filters, which isn't exactly what I'm looking for.  </p>
  
  <p>Here's a JSFiddle mockup I created:  </p>
  
  <p><a href="https://jsfiddle.net/4m5up9bx/2/" rel="nofollow">https://jsfiddle.net/4m5up9bx/2/</a></p>
  
  <pre><code>    &lt;div align=center&gt;&lt;a href="a" class="navy small btn"&gt;Mapping Tools&lt;/a&gt;
      &lt;a href="b" class="teal small btn"&gt;Charting Tools&lt;/a&gt;
      &lt;a href="c" class="green small btn"&gt;Analyzing Data&lt;/a&gt;
      &lt;a href="d" class="yellow small btn"&gt;Programming Tools&lt;/a&gt;
      &lt;a href="e" class="orange small btn"&gt;Other Data Tools&lt;/a&gt;&lt;/div&gt;
  
  
      &lt;table id="tools" border=1 cellpadding=7&gt;
          &lt;thead&gt;
          &lt;th&gt;Program&lt;/th&gt;
          &lt;th&gt;Type&lt;/th&gt;
          &lt;th&gt;Skill Level&lt;/th&gt;
          &lt;th&gt;Website&lt;/th&gt;
  
  
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              {% for obj in object_list %}
  
              &lt;td&gt;&lt;a href="{{ obj.id }}/"&gt;{{ obj.program }}&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;{{ obj.type }}&lt;/td&gt;
              &lt;td&gt;{{ obj.skill_level }}&lt;/td&gt;
              &lt;td&gt;&lt;a href="{{ obj.website }}/"&gt;{{ obj.website }}&lt;/a&gt;&lt;/td&gt;
              &lt;/tr&gt;
          {% endfor %}
      &lt;/tbody&gt;
      &lt;/table&gt;
  </code></pre>
  
  <p>Doesn't quite work without the python but will give you the gist. To start, the table displays all results, as you might expect.  Essentially, all I want to do is allow for someone to click one of the buttons and have the table filter if the column "Type" equals a set text value. </p>
  
  <p>I have a field ('Type') which includes five set values: Mapping, Charts, Data Analysis, Programming and Other. </p>
  
  <p>So, if someone were to click the Mapping Tools button, I'd like the datatable to filter only to results where {{obj.type}} = "Mapping"  Any thoughts? </p>