Hi Kirupa & team!
Way back to Flash era I really learned so much with you
I love VanillaJS and the power its getting. I’m a designer who also makes static websites and loves programming but I’m a complete novice. I’m very curious and love to research but not at all a real developer.
I see a lot of tutorials and some courses but I don’t really have time and projects to practice and really evolve.
I’m now in a new one which I think it’s way over my head. But I love challenges, so…
About this post.
I’m making a (very) simple App but for me it has enormous challenges. The first, and biggest one (I hope), is to control the several players points with just two buttons. The idea is to have a kind of table with the different points for each player e.g. Badges, Tickets, etc., and select a specific point (badges of player 1, for instance) and Add or Remove points from it with one of the 2 buttons available. Then click in another value and do the same
After some totally failed attempts, I’ve come up with this “almost there” one (inspired by your “Handling Events for Multiple Elements” tutorial) but my solution seems very dirty. And I’m stuck with these problems:
the button keeps adding to all selected elements
It’s not updating the value in the table. Eventually I will store this on an Object but I suppose it will be more or less the same
It’s not styling only the selected element. I can’t test to remove the style if clicked outside.
I’ve made this Codepen https://codepen.io/Desirat/pen/qBpKbor?editors=0011
The idea (and only functional part) is to click only the values and then the + button.
Thanks for listening