Home › Forums › JavaScript › How do I only target one instance of a class? › Reply To: How do I only target one instance of a class?
December 14, 2013 at 6:36 pm
#158363
Participant
don’t have a common parent.
Well, I guess “ancestor” is a better term. …looks like div.grid
is the closest. You could even use the document
if you wanted to; events bubble that high.
nevermind
Actually, now that I’m looking closer (and hopefully, understanding better), you could attach the handler to your .card
s. It would be easier, though, if you had a data-*
attribute to tie each button directly to the content it controls.