I am trying to add an onClick event to the buttons I created here: https://makerlist.io/smart-feature-finder/. I am adding a "Hello, World!" statement that appears when the button is clicked to test it. Here is the code I'm using, however nothing appears. Any ideas on what I am missing?
document.getElementsByClassName(".esg-filterbutton").addEventListener("click", myFunction);
function myFunction() {
alert ("Hello, World!");
}
Thanks,
Jonahan