- $('>tbody', tables).each(function(){
- $(this).prepend($('thead>tr', this).clone().css('opacity:0'));
+ $(selector).each(function() {
+ var the_table = this;
+ if ($('>tbody>tr:first>th', the_table).length > 0)
+ return;
+ $('>tbody', the_table).
+ prepend($('>thead>tr', the_table).
+ clone().
+ css('opacity', 0));