Skip to content
Advertisement

Add Event Listener not Connecting to Button

I am trying to click a button, that will then change the display of overlay on my page to none. In the console it is telling me that, startButton.addEventListener is not a function. Can someone help me find the bug?

JavaScript

Advertisement

Answer

Get your button with getElementById, it works

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement