From 869354fe7f2b1da5020b302234188af63c65f160 Mon Sep 17 00:00:00 2001 From: sl-ffx Date: Tue, 3 Aug 2021 10:29:12 +0200 Subject: [PATCH] get th index from row instead of table --- stupidtable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stupidtable.js b/stupidtable.js index c4d6825..317939e 100644 --- a/stupidtable.js +++ b/stupidtable.js @@ -216,7 +216,7 @@ var $th; if(!index && index !== 0){ $th = $table_ths.siblings('#' + identifier); - index = $table_ths.index($th); + index = $th.index(); } else{ $th = $table_ths.eq(index);