tablesorter/dist/js/widgets/widget-repeatheaders.min.js
Mottie 263aa97e66 Build: add combined file with selected widgets & parsers. See #855
NOTE: the core js/jquery.tablesorter.js file is no longer UMD wrapped!; this is done by the build process now

Updated various parser & widget comments
2015-03-28 15:03:50 -05:00

2 lines
617 B
JavaScript

/*! Widget: repeatHeaders - updated 2/7/2015 (v2.19.0) */
!function(a){"use strict";a.tablesorter.addWidget({id:"repeatHeaders",priority:10,options:{rowsToSkip:4},format:function(b,c,d){var e,f,g,h,i="";if(!d.repeatHeaders){for(i='<tr class="repeated-header remove-me">',e=0;e<c.columns;e++)i+="<th>"+a.trim(c.$headers.eq(e).text())+"</th>";d.repeatHeaders=i+"</tr>"}for(h=d&&d.rowsToSkip||4,c.$table.find("tr.repeated-header").remove(),f=c.$tbodies.find("tr"),g=f.length,e=h;g>e;e+=h)f.eq(e).before(d.repeatHeaders)},remove:function(a,b,c){c.repeatHeaders="",b.$table.find("tr.repeated-header").remove()}})}(jQuery);