I have a large amount of buttons all used to display a div before it, my question is instead of having 20 different javascript functions which all do the same thing, is it possi
HTML:
▼
JavaScript:
var buttons = document.getElementsByClassName("drop-button"); for(var i = 0; i < buttons.length; i++) { buttons[i].addEventListener("click", function(){ this.style.display="block"; }); {