title: How to enable button after at least one row has been checked in Datatables?
body: <p>In this test code, I have a button that I want to be disabled if no checkboxes are checked and enabled if at least one checkbox is checked.</p>
  <p>The function to do this works but not on data tables. I am trying to make it work on datatables. But its not working with me</p>
  <p>This is not my code... This is just to test.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function() {
    var dataTable = $('#example').dataTable({
      columnDefs: [{
          orderable: false,
          className: 'select-checkbox',
          targets: 0
        },
        {
          "visible": false,
          "searchable": false,
        }
      ],
      select: {
        style: 'multi',
        selector: 'td:first-child'
      },
      order: [
        [1, 'asc']
      ]
    })
  
    var checkBoxes = $('.select-checkbox');
    checkBoxes.change(function() {
      $('#btnSelectedRows').prop('disabled', checkBoxes.filter(':checked').length &lt; 1);
    });
    $('.select-checkbox').change();
  
  });
  
  
  &lt;
  /script&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
  
  
    &lt;link rel="stylesheet" type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.0/css/jquery.dataTables.css"&gt;
    &lt;link rel="stylesheet" type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.0/css/jquery.dataTables_themeroller.css"&gt;
    &lt;script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" charset="utf8" src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.0/jquery.dataTables.min.js"&gt;&lt;/script&gt;
    &lt;link rel="stylesheet" href="https://cdn.datatables.net/select/1.3.1/css/select.dataTables.min.css"&gt;
    &lt;link href='http://codeseven.github.io/toastr/build/toastr.min.css' rel='stylesheet' type="text/css"&gt;
    &lt;script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.22/datatables.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="https://cdn.datatables.net/select/1.3.1/js/dataTables.select.min.js"&gt;&lt;/script&gt;
    &lt;script src="js/bootstrap.min.js"&gt;&lt;/script&gt;
  
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
  
    &lt;button id="btnSelectedRows" name="btnSelectedRows" data-target="#grnModal" data-toggle="modal" class="btn btn-success btn-s"&gt;
                  click
                  &lt;/button&gt;
    &lt;table class="dataTable" id="example"&gt;
      &lt;thead&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;/th&gt;
          &lt;th&gt;Rendering engine&lt;/th&gt;
          &lt;th&gt;Browser&lt;/th&gt;
          &lt;th&gt;Platform(s)&lt;/th&gt;
          &lt;th&gt;Engine version&lt;/th&gt;
          &lt;th&gt;CSS grade&lt;/th&gt;
        &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
  
  
        &lt;tr&gt;
  
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;Misc&lt;/td&gt;
          &lt;td&gt;Dillo 0.8&lt;/td&gt;
          &lt;td&gt;Embedded devices&lt;/td&gt;
          &lt;td&gt;-&lt;/td&gt;
          &lt;td&gt;X&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;Misc&lt;/td&gt;
          &lt;td&gt;Links&lt;/td&gt;
          &lt;td&gt;Text only&lt;/td&gt;
          &lt;td&gt;-&lt;/td&gt;
          &lt;td&gt;X&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;Misc&lt;/td&gt;
          &lt;td&gt;Lynx&lt;/td&gt;
          &lt;td&gt;Text only&lt;/td&gt;
          &lt;td&gt;-&lt;/td&gt;
          &lt;td&gt;X&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;Misc&lt;/td&gt;
          &lt;td&gt;IE Mobile&lt;/td&gt;
          &lt;td&gt;Windows Mobile 6&lt;/td&gt;
          &lt;td&gt;-&lt;/td&gt;
          &lt;td&gt;C&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;Misc&lt;/td&gt;
          &lt;td&gt;PSP browser&lt;/td&gt;
          &lt;td&gt;PSP&lt;/td&gt;
          &lt;td&gt;-&lt;/td&gt;
          &lt;td&gt;C&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;Other browsers&lt;/td&gt;
          &lt;td&gt;All others&lt;/td&gt;
          &lt;td&gt;-&lt;/td&gt;
          &lt;td&gt;-&lt;/td&gt;
          &lt;td&gt;U&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>