From f56df6c2e08ccf6309dc5eab103650f8986d0731 Mon Sep 17 00:00:00 2001 From: davemachado Date: Wed, 16 Aug 2017 20:52:07 -0400 Subject: [PATCH] add Section column to query scope --- src/scripts.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/scripts.js b/src/scripts.js index 2b04b4f..a9e143b 100644 --- a/src/scripts.js +++ b/src/scripts.js @@ -67,9 +67,17 @@ function filterRows() { // Loop through all table rows and hide those who don't match the search for (i = 0; i < tr.length; i++) { - td = tr[i].getElementsByTagName("td")[0]; - if (td) { - if (td.innerHTML.toUpperCase().indexOf(filter) > -1) { + title = tr[i].getElementsByTagName("td")[0]; + section = tr[i].getElementsByTagName("td")[4]; + if (title) { + if (title.innerHTML.toUpperCase().indexOf(filter) > -1) { + tr[i].style.display = ""; + } else { + tr[i].style.display = "none"; + } + } + if (section) { + if (section.innerHTML.toUpperCase().indexOf(filter) > -1) { tr[i].style.display = ""; } else { tr[i].style.display = "none";