Attach an HREF and a class to an img link generated by the PhotoSlider script?
Posted
by Frank Bailey
on Stack Overflow
See other posts from Stack Overflow
or by Frank Bailey
Published on 2010-04-06T13:46:34Z
Indexed on
2010/04/06
19:33 UTC
Read the original article
Hit count: 189
Hi folks, I'm using the very nice PhotoSlider script from http://opiefoto.com/articles/photoslider to create a slide show of images for one of my clients.
This script replaces a previous hand-coded Javascript solution that allowed for the large image to be clicked resulting in a lightbox modal popup showing the full-size version of the clicked picture.
Of course the client insists that this functionality remain intact, but the HTML code for the large image is generated on-the-fly by the PhotoSlider script itself.
This means I'll need to modify the script slightly to attach a class ("lightbox") and an href (or just a click event, whichever makes more sense), but I'm not quite sure how best to accomplish this. I figure the event and class will have to be attached each time a thumbnail is clicked, but if this isn't the best way to do it any advice will be appreciated.
The script is implemented into my page as can be seen here, without the click or class. I'd really appreciate any assistance stackoverflowites can offer.
Thanks in advance!
© Stack Overflow or respective owner