Spaces:
Running
Running
//Dropdown lists | |
document.getElementById('dropdown').addEventListener('change', function() { | |
var selectedOption = this.value; | |
var allContents = document.querySelectorAll('.content'); | |
for (var i = 0; i < allContents.length; i++) { | |
if (allContents[i].id === selectedOption) { | |
allContents[i].classList.remove('hidden'); | |
} else { | |
allContents[i].classList.add('hidden'); | |
} | |
} | |
}); | |