/ 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: <a href="http://jsfiddle.net/xWWYN/">jsFiddle</a>
Snippet will clone all children elements from thead, reverse and insert to tfoot. Example at jsFiddle: <a href="http://jsfiddle.net/xWWYN/">jsFiddle</a>
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var $tfoot = $('<tfoot></tfoot>'); $($('thead').clone(true, true).children().get().reverse()).each(function(){ $tfoot.append($(this)); }); $tfoot.insertAfter('table thead');
URL: http://goo.gl/ZcNLf
Comments
