title: contextmenu() with datatables?
body: <p>I want to add some contextmenu events like <strong>filter, nofilter</strong> and <strong>delete</strong>, this is my code. </p>
  
  <pre class="lang-js prettyprint-override"><code>$("#albums_minimal").contextmenu({
    delegate: " .dataTable td",
    menu: [{
        title: "Filter",
        cmd: "filter"
      },
      {
        title: "Remove filter",
        cmd: "nofilter"
      },
      {
        title: "Delete",
        cmd: "delete"
      },
    ],
    select: function(event, ui) {
      var celltext = ui.target.text();
      var colvindex = ui.target.parent().children().index(ui.target);
      var colindex = $('table thead tr th:eq(' + colvindex + ')'.data('column-index'));
      switch (ui.cmd) {
  
        case "filter":
          table
            .column(colindex)
            .search('^' + celltext + '$', true)
            .draw();
          break;
        case "nofilter":
          table
            .search('')
            .column().search('')
            .draw();
          break;
        case "delete":
          $(ui.target).parent().remove();
          break;
  
      }
    },
    beforeOpen: function(event, ui) {
      var $menu = ui.menu,
        $target = ui.target,
        extraData = ui.extraData;
      ui.menu.zIndex(0);
    }
  });
  </code></pre>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div class="col-sm-12"&gt;
    &lt;table id="albums_minimal" class=" table table-striped table-bordered" style="width:100%" data-ajax="/api/albums/?format=datatables"&gt;
      &lt;thead&gt;
        &lt;tr&gt;
          &lt;th data-data="rank"&gt;Rank&lt;/th&gt;
          &lt;th data-data="artist_name" data-name="artist.name"&gt;Artist&lt;/th&gt;
          &lt;th data-data="name"&gt;Album name&lt;/th&gt;
        &lt;/tr&gt;
      &lt;/thead&gt;
    &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I followed this link: <a href="http://jsfiddle.net/rathore_gee/5vdb7t0L/" rel="nofollow noreferrer">http://jsfiddle.net/rathore_gee/5vdb7t0L/</a></p>
  
  <p>It's not work with my code above.</p>
  
  <p>What should I do to make it run successfully?</p>