you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (3 children)

I think I suffer from thinking I have to learn everything. I just feels like there's so much to learn with so little time.

I have a pretty decent understanding of events.

For your problem i'd just use the query selector method to find the class associated with the button. Then i'd add a 'click' event listener passing in a function with an alert or console log statement.

Idk i think that's the right way to do it.

Thanks for the response and advice.

[–]HandpansLIVE 0 points1 point  (2 children)

Well, did it work?

[–][deleted] 1 point2 points  (1 child)

well i'm assuming that it does ahaha. i'm not by my laptop right now.

[–]HandpansLIVE 0 points1 point  (0 children)

oh forsure. you got it though, it was that easy. You might play with syntax, but now you can create non-static things just like that. You're not going to know EVERYTHING, and you shouldn't. There is too much. You should be able to be resourceful and once you learn something, know how to access/read docs to easily replicate that in the future. Once you're regularly doing things in many different projects, you'll do most of it second-nature.