title: datatables saving selected state after table redraw
body: <p>Using rowcallback to show previously selected rows in the table after redraw... nothing is happening.  I have confirmed in the console that my 'selected' array is correct, but the callback doesn't seem to be doing anything.</p>
  
  <p>Selected stores the tr's id value in its array... on callback if the rows value is in that array the classes should be applied to it.</p>
  
  <pre><code>$('#sample_1').dataTable({
      "processing": true,
      "serverSide": true,
      "ajax": "/custom/data-tables/process.php",
      // set timestamp as initial sorting
      "aaSorting": [[5,'desc']],
      // change index column
      "columnDefs": [
          {
              "targets": [ 0 ],
              "searchable": false,
              "sortable": false,
              "render": function ( data, type, row ) {
                  return '&lt;input type="checkbox" class="checkboxes" value="'+data+'" /&gt;';
              }
          }
      ],
      "fnDrawCallback": function() {
          $('#sample_1 .checkboxes, #sample_1 .group-checkable').uniform();
      },
      "rowCallback": function( row, data, displayIndex ) {
          if ( $.inArray(data.DT_RowId, selected) !== -1 ) {
              $(row).addClass('active selected');
          }
      }
  });
  
  
  
  var selected = [];
  
  $('#sample_1_wrapper').on('change', 'tbody tr .checkboxes', function () {
  
      var id = $(this).parents('tr').attr("id");
      console.log('id '+id);
      var index = $.inArray(id, selected);
      console.log('index '+index);
  
  
      if ( index === -1 ) {
          selected.push( id );
      }
      else {
          selected.splice( index, 1 );
      }
      console.log('selected '+selected);
      // add checked status and 
      var checked = $(this).is(":checked");
  
      if (checked) {
          $(this).attr("checked", true);
          $(this).parents('tr').addClass("active selected");
      }
      else {
          $(this).attr("checked", false);
          $(this).parents('tr').removeClass("active selected");
      }               
  });
  </code></pre>
  
  <p><strong>More info</strong></p>
  
  <p>Using the console log in the rowCallback before the if statement returns these values :</p>
  
  <p>console.log(data.DT_RowId);
  console.log(selected);</p>
  
  <p>187413
  ["187413"]</p>
  
  <p>So, 187413 is in the selected array so why is it not returning the correct response?</p>