Skip to content
Snippets Groups Projects
Commit 41b51f72 authored by Lyn Soley Kiener's avatar Lyn Soley Kiener
Browse files

Add new file

parent 232d44f0
Branches
No related tags found
No related merge requests found
const queryInput = document.getElementById("query");
const h4Elements = document.querySelectorAll(".maincontent h3");
queryInput.addEventListener("input", () => {
const query = queryInput.value.toLowerCase();
h4Elements.forEach((h4) => {
const h4Text = h4.textContent.toLowerCase();
if (h4Text.includes(query)) {
h4.parentNode.style.display = "block";
} else {
h4.parentNode.style.display = "none";
}
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment