Hey guys, I just spent the last five hours trying to figure this out, so I decided it was worth sharing.
I wanted to have several pictures appear in a lightbox when someone clicks a text link. The difficulty came in the fact that I did not want those pictures to appear on the page – I only wanted them to appear in a lightbox, and only when someone clicked the link to view them.
I made a video to show what I’m talking about and explain what to do.
Here’s the code I reference in the video:
<a href="#" class="lightbox-please">see pictures</a>
<a href="#" class="lightbox-please"></a>
[lightbox selector=".lightbox-please"]
I couldn’t remember if it is okay to have an a tag with nothing in it from an HTML standards perspective, so I actually did a W3C Validator test and it was all good, so cool there.
Hope this helps somebody on their journey!