mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
2 lines
638 B
JavaScript
2 lines
638 B
JavaScript
/*! Widget: repeatHeaders - updated 9/23/2016 (v2.27.7) */
|
|
!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 '+c.selectorRemove.slice(1)+'">',e=0;e<c.columns;e++)i+="<th>"+a.trim(c.$headers.eq(e).html())+"</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;e<g;e+=h)f.eq(e).before(d.repeatHeaders)},remove:function(a,b,c){c.repeatHeaders="",b.$table.find("tr.repeated-header").remove()}})}(jQuery); |