Skip to content

Commit d294650

Browse files
committed
javascript filtering on a page poc
1 parent 3a367fd commit d294650

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

js-filter/test.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<input type="text" id="filter" onkeyup="filterSources(value)"></input>
2+
3+
<script>
4+
function filterSources(filter) {
5+
const container = document.getElementsByClassName("docsContainer");
6+
var sources = container[0].getElementsByTagName("h3");
7+
//console.log(sources);
8+
console.log(filter)
9+
for (let source in sources){
10+
console.log(source.nextElementSibling);
11+
};
12+
}
13+
</script>

0 commit comments

Comments
 (0)