Sha256: 09f7fdf5775b73a74a769116e56a40de7e46e64fad8d8890028cb413d14da6eb
Contents?: true
Size: 1021 Bytes
Versions: 23
Compression:
Stored size: 1021 Bytes
Contents
$(document).ready(function(){ if(!sortPlease) return; $.tablesorter.addWidget({ id: "columnHighlight", format: function(table) { if (!this.tds) this.tds = $("td", table.tBodies[0]); if (!this.headers) this.headers = $("thead th", table); this.tds.removeClass("sorted"); var ascSort = $("th." + table.config.cssAsc); var descSort = $("th." + table.config.cssDesc); if (ascSort.length) index = this.headers.index(ascSort[0]); if (descSort.length) index = this.headers.index(descSort[0]); $("tr td:nth-child(" + (index+1) + ")", table.tBodies[0]).each(function(row){ $(this).addClass('sorted'); }); } }); //initialize the table var table = window.table = $('#data').tablesorter({ widgets: ['columnHighlight'], sortList: sortOrder//, //debug: true }) .tablesorterPager({container: $("#pager"), positionFixed: false}) .tablesorterMultiPageFilter({filterSelector: $("#filter input")}); });
Version data entries
23 entries across 23 versions & 1 rubygems