Here is the W3 example with javascript using onclick as a attribute.
Basically one can pass the element trigger (onclick attribute on div) to the function and then set variables resulting from a search of that element trigger for the nested images getting the src and alt information.
I also moved the id on the target picture to the container it was in. This allows one to get the container by id and then again search for the img nested within so we can change the src and alt with the variables we created above.
I run into this alot with the picture element creating problems with people who want to work with the <img> tag directly but have to work around it because you cannot add attributes directly to the <img> tag. Seems like a big tradeoff for just being able to add a small, medium, or big picture. I sure Coffeecup could come up with a way to give us the option of using just a <img> tag or a <img> tag using the <picture> tag but until then, its the only major limiting downfall of the program I can think of. The rest is awesome stuff ! (....yes I have made the request to Bob).
Bootstrap 5 CSS Grid.