15 lines
389 B
JavaScript
15 lines
389 B
JavaScript
|
// JavaScript code
|
||
|
function rechercher_evenement() {
|
||
|
let input = document.getElementById("searchbar").value;
|
||
|
input = input.toLowerCase();
|
||
|
let x = document.getElementsByClassName("animals");
|
||
|
|
||
|
for (i = 0; i < x.length; i++) {
|
||
|
if (!x[i].innerHTML.toLowerCase().includes(input)) {
|
||
|
x[i].style.display = "none";
|
||
|
} else {
|
||
|
x[i].style.display = "list-item";
|
||
|
}
|
||
|
}
|
||
|
}
|