JavaScript for WordPress Forums Vanilla JavaScript What am I doing wrong here? Reply To: What am I doing wrong here?


I was starting to think I’d need to incorporate a loop.
You pointing out the dot helped. And targeting one of the items in the array really cleared things up.

What I’m trying to do is display a share bar on images. Right now just targeting any images that are wrapped in WordPress’s Gallery wrapper.
Funny thing though, is when I do this, I get an empty Gallery Item with the share bar, instead of having it inject in the targeted one.

Heading back to the Loop lesson now.

Thank you!