scrimba
Bootcamp (HTML/CSS/JS) 2024
Bootcamp #10
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Bootcamp #10
AboutCommentsNotes
Bootcamp #10
Expand for more info
index.js
run
preview
console
document.getElementById("SearchInput")
.addEventListener("keyup",function(){
let searchQuery = event.target.value.toLowerCase();
let allNamesDOMCollection = document.getElementsByClassName('name');

for(let counter = 0; counter < allNamesDOMCollection.length;counter++){
const currentName = allNamesDOMCollection[counter].textContent.toLowerCase();
if(currentName.includes(searchQuery)){
allNamesDOMCollection[counter].style.display = "block";
} else {
allNamesDOMCollection[counter].style.display="none";
}
}
});
Console
/index.html
LIVE