mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-12-05 05:04:20 +00:00
2 lines
638 B
JavaScript
2 lines
638 B
JavaScript
/*! Widget: repeatHeaders - updated 9/23/2016 (v2.27.7) */
|
|
!function(e){"use strict";e.tablesorter.addWidget({id:"repeatHeaders",priority:10,options:{rowsToSkip:4},format:function(r,t,a){var o,d,i,s,n="";if(!a.repeatHeaders){for(n='<tr class="repeated-header '+t.selectorRemove.slice(1)+'">',o=0;o<t.columns;o++)n+="<th>"+e.trim(t.$headers.eq(o).html())+"</th>";a.repeatHeaders=n+"</tr>"}for(s=a&&a.rowsToSkip||4,t.$table.find("tr.repeated-header").remove(),i=(d=t.$tbodies.find("tr")).length,o=s;o<i;o+=s)d.eq(o).before(a.repeatHeaders)},remove:function(e,r,t){t.repeatHeaders="",r.$table.find("tr.repeated-header").remove()}})}(jQuery); |