No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
myElement.addEventListener('click', function(){ | myElement.addEventListener('click', function(){ | ||
console.log('clickediclick'); | console.log('clickediclick'); | ||
document.querySelectorAll('.team-list').forEach(el | document.querySelectorAll('.team-list').forEach(function(el){ | ||
el.classList.toggle('show'); | el.classList.toggle('show'); | ||
}); | }); |
Revision as of 20:25, 11 September 2022
/* Any JavaScript here will be loaded for all users on every page load. */
(function () {
var myElement = document.getElementById('team-toggle');
if ( myElement ) {
myElement.addEventListener('click', function(){
console.log('clickediclick');
document.querySelectorAll('.team-list').forEach(function(el){
el.classList.toggle('show');
});
});
}
}());