07.10.2026 - QuizStart with Search

This commit is contained in:
2026-10-07 17:04:33 +02:00
parent 6973be1069
commit 10b7139ba6
13 changed files with 169 additions and 26 deletions
+26
View File
@@ -0,0 +1,26 @@
document.getElementById("navSearch").oninput = (event) => {
navigationSearch(event)
};
function navigationSearch(event){
let value = document.getElementById("navSearch").value;
let lists = document.getElementById("navListItems").childNodes;
lists.forEach((element, key )=> {
if(element.textContent.includes(value))
{
console.log(element.childNodes[0].hidden = false);
}else
{
console.log(element.childNodes[0].hidden = true);
}
console.log(element.textContent);
});
console.log("Input: " +value);
}