0
Why can't I make my image interactive?
I'm making a cookie clicker game for a grand review for HTML, CSS, and JS, but when I put: "onclick='click()'", It wouldn't execute the function I created, I tried using a span, but it didn't work either, can someone help me out here? I thought JS made everything interactive.
2 ответов
+ 2
Your span is tiny, so it's useless as a hitbox. I reassigned the id and onclick to the cookie image instead.
https://sololearn.com/compiler-playground/WP7iOjI5vQVP/?ref=app
+ 1
link your code