Skip to content
Advertisement

Tag: user-interaction

Javascript event listeners and arrays

I am trying to recreate a scratch-to-reveal-image effect with 3 images in an array triggered by 3 buttons. My event listener is not working, as you can see, it shows the same revealed images no matter the button. The event listener syntax has confused me a bit and I would like some help on that specifically. The sketch image overlay

Advertisement