Guest User

Untitled

a guest
Dec 12th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. $(document).ready(function () {
  2. $('#alerta thead th').each(function () {
  3. var title = $(this).text();
  4. $(this).html(title + ' <input type="text"/>');
  5. });
  6.  
  7. var table = $('#alerta').DataTable();
  8.  
  9. table.columns().every(function () {
  10. var table = this;
  11. $('input', this.header()).on('keyup change', function () {
  12. if (table.search() !== this.value) {
  13. table.search(this.value).draw();
  14. }
  15. });
  16. });
  17. });
Add Comment
Please, Sign In to add comment