title: Datatables, change AJAX data ( not with elements )
body: <p>I have a Datatable which is getting populated by AJAX. All is good but i want to have some shortcuts to request data from the server. Problem is how can i change the data i'm sending on the fly ? I know i can create an element <code>&lt;input&gt;</code> or something and it can get the value from that, but i was hoping i could change the data once something is clicked.</p>
  
  <pre><code>var Table = $('#table').DataTable({
              "ajax": {
                  "type" : "POST",
                  "url": "url",
                  "data": function ( d ) {
                      d.cmd = "offline";
                  }
              },
          });
  </code></pre>
  
  <p>This works fine and passes the <code>cmd</code> as <code>offline</code> back to the server.
  How can i change that value on click before the <code>ajax.reload</code> is called.</p>
  
  <pre><code>$('#online_btn').on( 'click', function () {
              Table.ajax.reload();
          } );
  </code></pre>
  
  <p>Using this </p>
  
  <pre><code>$('#online_btn').on( 'click', function () {
              var d = [];
              d.cmd = "online";
              Table.ajax.data(d);
              Table.ajax.reload();
          } );
  </code></pre>
  
  <p>Gives back an <code>ajax.data is not a function</code> error</p>