From 8746f2e93fe889ac0ba9e801b3684764fffa2945 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Thu, 3 Dec 2020 00:04:52 +0300 Subject: add table row index --- wqflask/wqflask/static/new/javascript/auto_hide_column.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/static/new/javascript/auto_hide_column.js b/wqflask/wqflask/static/new/javascript/auto_hide_column.js index 652b2ad7..73b639dc 100644 --- a/wqflask/wqflask/static/new/javascript/auto_hide_column.js +++ b/wqflask/wqflask/static/new/javascript/auto_hide_column.js @@ -1,10 +1,10 @@ $(function (){ -$("table th").each(function(index,col_th){ +$("table th").each(function(th_index,col_th){ var filter_counter = 0; // map each column to row ie column i to ith element var column_tds = $(this).closest('table').find('tr td:nth-child(' + (index + 1) + ')') - column_tds.each(function(j,col_td){ + column_tds.each(function(td_index,col_td){ if(this.innerHTML==''||this.innerHTML=="N/A"){ filter_counter+=1; } -- cgit v1.2.3