I am using Lightbox 2 on several image galleries. I would like to provide a way for my users to download the images in the gallery while they are viewing them in the Lightbox. A "Download" button would be perfect, and I picture it down near the caption.
What I've found but can't make use of:
1.) A working WordPress plugin--but I'm not using WordPress
Here you can find a modded version of Lightbox offered as a WordPress plugin. This site uses it (look at the pictures of the kids in the motion-capture suits). I think the Download link he has inserted it perfect, but I would rather not change my markup to work with a WordPress plugin. I want to follow the Lightbox 2 pattern with data-lightbox.
2.) This snippet that I do not understand. It was provided with the cryptic instruction to "modify the lightbox.js file." But where?:
Add your markup for the download button to the template that lightbox uses. Lightbox hijacks all the clicks to the plugin, so you have to add an event handler to your new markup. Do this in the same start function that you added your markup in. You can use
to open the link in a new tab.
Then you can populate the link based on
later in the updateDetails function.