Return to Snippet

Revision: 63898
at June 15, 2013 21:39 by NeXTs


Initial Code
var $tfoot = $('<tfoot></tfoot>');
$($('thead').clone(true, true).children().get().reverse()).each(function(){
    $tfoot.append($(this));
});
$tfoot.insertAfter('table thead');

Initial URL
http://goo.gl/ZcNLf

Initial Description
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: <a href="http://jsfiddle.net/xWWYN/">jsFiddle</a>

Initial Title
Cloning table header to the bottom of table with reverse

Initial Tags
table

Initial Language
jQuery