summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--root.template13
1 files changed, 9 insertions, 4 deletions
diff --git a/root.template b/root.template
index 8cb65e8..e396d0e 100644
--- a/root.template
+++ b/root.template
@@ -28,6 +28,10 @@
:checked + #search-box {
display: block;
}
+
+ :checked ~ * .filtered {
+ display: none;
+ }
</style>
</head>
<body>
@@ -85,7 +89,7 @@
</form>
</div><br>
<label for="dosearch">Vis søg</label>
- <input type="checkbox" id="doseach">
+ <input type="checkbox" id="dosearch">
<div id="search-box">
<label for="search">Filter: </label>
<input type="input" id="search">
@@ -122,15 +126,16 @@
}
if (row.textContent.indexOf(value) > -1) {
- row.style.display = "";
+ row.classList.remove("filtered");
} else {
- row.style.display = "none";
+ row.classList.add("filtered");
}
}
status.textContent = "done";
}
- e = document.getElementById("search");
+
+ var e = document.getElementById("search");
e.addEventListener("change", inputchange);
e.addEventListener("keyup", inputchange);
</script>