jQuery DataTables 1.10.11 with scrolling enabled duplicates footer leading to duplicate IDs

by Oxolotl

HTML

<script src="https://cdn.datatables.net/1.10.11/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.11/css/jquery.dataTables.min.css">
<table id="datatable">
  <thead>
    <tr>
      <td>Last name</td>
      <td>First name</td>
      <td>Date of birth</td>
    </tr>
  </thead>
  <tfoot>
    <tr>
      <td>
        <input id="lastname" />
      </td>
      <td>
        <input id="firstname" />
      </td>
      <td>
        <input id="dob" />
      </td>
    </tr>
  </tfoot>
  <tbody>
    <tr>
      <td>Doe</td>
      <td>John</td>
      <td>01.01.1970</td>
    </tr>
  </tbody>
</table>

JavaScript

$('#datatable').dataTable({
	scrollY : 'auto'
});
alert('Number of inputs with ID "lastname": ' + $('input[id="lastname"]').length);