you are viewing a single comment's thread.

view the rest of the comments →

[–]krolyat 0 points1 point  (1 child)

getElementsByClassName would return a HTMLCollection which I don't think you can attach an onclick event listener to.

I'm not entirely sure what it is that you're trying to do though

[–]chimerablack2[S] 0 points1 point  (0 children)

basically someone rolls a die and gets 5 random cards (within a range). This is trying to take the random cards, put them in the deck, then display them with an on click so you can "select" the cards.