From b8f7756b13a2c9e1ef0f842053e43563895f2715 Mon Sep 17 00:00:00 2001 From: Moh Atia <mohamed.atia@phila.gov> Date: Mon, 22 Jan 2024 10:34:19 -0500 Subject: [PATCH] trim whitespace fom table columns --- wp/wp-content/themes/phila.gov-theme/js/dev/hide-empty-table.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp/wp-content/themes/phila.gov-theme/js/dev/hide-empty-table.js b/wp/wp-content/themes/phila.gov-theme/js/dev/hide-empty-table.js index 38703c3004..330d8de1dd 100644 --- a/wp/wp-content/themes/phila.gov-theme/js/dev/hide-empty-table.js +++ b/wp/wp-content/themes/phila.gov-theme/js/dev/hide-empty-table.js @@ -8,7 +8,7 @@ $('table.js-hide-empty').each(function(i, obj) { var tds = $(this).parents('table').find('tr td:nth-child(' + (i + 1) + ')'); tds.each(function(j) { - if (this.innerHTML == '') remove++; + if (this.innerHTML.trim() == '') remove++; if (this.innerHTML == ' ') remove++; if (this.innerHTML == '<b><span class="responsive-label">Description: </span></b> ') remove++; });