From f179ad8e0e24cf4c6726e95a6b1214212843a159 Mon Sep 17 00:00:00 2001 From: Purpleskill <44528281+Purpleskill@users.noreply.github.com> Date: Fri, 14 Jan 2022 14:52:15 +0100 Subject: [PATCH] Fix issue #45 Memorize current sorted column when sorted by click. --- jquery.tablesort.js | 1 + 1 file changed, 1 insertion(+) diff --git a/jquery.tablesort.js b/jquery.tablesort.js index c46dbd3..cd8151c 100644 --- a/jquery.tablesort.js +++ b/jquery.tablesort.js @@ -42,6 +42,7 @@ if (this.index !== th.index()) { this.direction = 'asc'; this.index = th.index(); + this.$th = th } else if (direction !== 'asc' && direction !== 'desc') this.direction = this.direction === 'asc' ? 'desc' : 'asc';