Skip to content

Commit f56df6c

Browse files
committed
add Section column to query scope
1 parent 621aa05 commit f56df6c

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/scripts.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,17 @@ function filterRows() {
6767

6868
// Loop through all table rows and hide those who don't match the search
6969
for (i = 0; i < tr.length; i++) {
70-
td = tr[i].getElementsByTagName("td")[0];
71-
if (td) {
72-
if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
70+
title = tr[i].getElementsByTagName("td")[0];
71+
section = tr[i].getElementsByTagName("td")[4];
72+
if (title) {
73+
if (title.innerHTML.toUpperCase().indexOf(filter) > -1) {
74+
tr[i].style.display = "";
75+
} else {
76+
tr[i].style.display = "none";
77+
}
78+
}
79+
if (section) {
80+
if (section.innerHTML.toUpperCase().indexOf(filter) > -1) {
7381
tr[i].style.display = "";
7482
} else {
7583
tr[i].style.display = "none";

0 commit comments

Comments
 (0)