title: select all checkbox datatable trigger
body: <p>I've been currently struggling with this problem for days. The problem is how can I makes the 'click' on the select all checkbox on thead of datatables to trigger something (in this case, a "disabled" class for my buttons)?</p>
  
  <p>I've makes the trigger work when user 'click' the checkbox one by one, but I can't make it works when user click the select all checkbox. Please help me, thankyou in advance.</p>
  
  <p>This is my Datatables script:</p>
  
  <pre><code>$(document).ready(function () {
              table = $('#em').DataTable({
                  "scrollY": "45vh",
                  "scrollX": true,
                  "scrollCollapse": true,
                  "paging": false,
  
                  "responsive": true,
  
                  "aaSorting": [1, 'desc'],
                  "iDisplayLength": 5,
                  "ajax": {
                      "url": "/Eromo_Web/inv?act=getAll",
                      "type": "POST",
                      "dataSrc": ""
                  },
                  "columnDefs": [
                      {
                          'targets': 0,
                          'checkboxes': {
                              'selectRow': true
                          }
                      }
                  ],
                  "columns": [
                      {"data": null},
                      {"data": "CODE"},
                      {"data": "TYPE"},
                      {"data": "NAME"},
                      {"data": "KIND"},
                      {"data": "MERK"},
                      {"data": "MODEL_TYPE"},
                      {"data": "LOC"},
                      {"data": "BUY_DATE"},
                      {"data": "USERNAME"},
                      {"data": "DESCR"},
                      {"data": "RFRGRNT"},
                      {"data": "MANF"},
                      {"data": "COUNTRY"}
                  ]
              });
  </code></pre>
  
  <p>My current click trigger:</p>
  
  <pre><code>//getting ID on checkbox click
              $('#em').on('change', null, function () {
                  if (table.column(0).checkboxes.selected().length &gt; 0) {
                      $('#generateqrcode').attr('disabled', false);
                  } else {
                      $('#generateqrcode').attr('disabled', true);
                  }
                  if (table.column(0).checkboxes.selected().length === 1) {
                      ID = "";
                      $.each(table.column(0).checkboxes.selected(), function (key, value) {
                          ID = value["CODE"];
                      });
                      $('#update').attr('disabled', false);
                      $('#delete').attr('disabled', false);
                  } else {
                      $('#update').attr('disabled', true);
                      $('#delete').attr('disabled', true);
                  }
              });
  </code></pre>