Skip to content

Commit e29e181

Browse files
committed
Merge pull request christianbach#10 from aran112000/patch-1
Updated to comply with "use strict"
2 parents 8126d78 + 8c40c38 commit e29e181

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

jquery.tablesorter.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@
388388

389389
var header_index = computeTableHeaderCellIndexes(table);
390390

391-
$tableHeaders = $(table.config.selectorHeaders, table).each(function (index) {
391+
var $tableHeaders = $(table.config.selectorHeaders, table).each(function (index) {
392392

393393
this.column = header_index[this.parentNode.rowIndex + "-" + this.cellIndex];
394394
// this.column = index;
@@ -580,14 +580,16 @@
580580
}
581581

582582
/* sorting methods */
583+
584+
var sortWrapper;
583585

584586
function multisort(table, sortList, cache) {
585587

586588
if (table.config.debug) {
587589
var sortTime = new Date();
588590
}
589591

590-
var dynamicExp = "var sortWrapper = function(a,b) {",
592+
var dynamicExp = "sortWrapper = function(a,b) {",
591593
l = sortList.length;
592594

593595
// TODO: inline functions.
@@ -864,11 +866,9 @@
864866
};
865867
this.clearTableBody = function (table) {
866868
if ($.browser.msie) {
867-
function empty() {
868-
while (this.firstChild)
869-
this.removeChild(this.firstChild);
869+
while (table.tBodies[0].firstChild) {
870+
table.tBodies[0].removeChild(table.tBodies[0].firstChild);
870871
}
871-
empty.apply(table.tBodies[0]);
872872
} else {
873873
table.tBodies[0].innerHTML = "";
874874
}

0 commit comments

Comments
 (0)