Posted By

NeXTs on 06/15/13


table thead tfoot

Versions (?)

Cloning table header to the bottom of table with reverse

 / Published in: jQuery


Snippet may be usefull for cloning table header to the bottom of table.

Snippet will clone all children elements from thead, reverse and insert to tfoot. Example at jsFiddle: jsFiddle

  1. var $tfoot = $('<tfoot></tfoot>');
  2. $($('thead').clone(true, true).children().get().reverse()).each(function(){
  3. $tfoot.append($(this));
  4. });
  5. $tfoot.insertAfter('table thead');

Report this snippet  

You need to login to post a comment.