Accessibility Tools

Lecturers

document.getElementById('search__employee').addEventListener('input', function() { let filter = this.value.toLowerCase(); let employeeSections = document.querySelectorAll('.employees'); employeeSections.forEach(function(section) { let items = section.querySelectorAll('li'); let hasVisibleItems = false; items.forEach(function(item) { let text = item.textContent.toLowerCase(); if (text.includes(filter)) { item.classList.remove('d-none'); hasVisibleItems = true; } else { item.classList.add('d-none'); } }); if (hasVisibleItems) { section.classList.remove('d-none'); } else { section.classList.add('d-none'); } }); });