I am trying to make the elements with the same class have the same function.
to test if it worked i tried to alert("test") when one of the elements are clicked. But this does not seem to work.
Does anyone have a solution?
var expand = document.getElementsByClassName("expand");
expand.addEventListener("click", function(){
alert("test");
})