1<div class="test">
2 Pakket
3</div>
4<div class="test">
5 Handtekening
6</div>
7<div class="test">
8 Thuis
9</div>
1let filteredOut = ['Handtekening', 'Thuis'];
2
3Array.from(document.querySelectorAll(".test")).forEach((elm) => {
4 if(filteredOut.includes(elm.textContent.trim())) elm.style.display = "none";
5});
6
1let divs = document.getElementsByClassName('test');
2
3for (let x = 0; x < divs.length; x++) {
4 let div = divs[x];
5 let content = div.innerHTML.trim();
6
7 if (content == 'Handtekening' || content == 'Thuis') {
8 div.style.display = 'none';
9 }
10}
11
1var divs = document.querySelectorAll(".test");
2Array.from(divs).forEach(function(div) {
3 if (div.textContent.indexOf("Handtekening") >= 0 || div.textContent.indexOf("Thuis") >= 0) {
4 div.style.display = "none";
5 }
6});
1<div class="test">
2 Pakket
3</div>
4<div class="test">
5 Handtekening
6</div>
7<div class="test">
8 Thuis
9</div>
10