I want to add Lightbox to a image which is output by Javascript. The image link is built up dynamically so thats why I am doing it this way!
I have looked on S.O. but no luck with what is already there…
The code currently is;
$("#imgMain img").attr("src","/_images/multi/"+productCode+"/"+imgCodeAlt+"_l.jpg");
And i somehow need to append it with rel=”lightbox”
Thanks in advance 🙂
Shaun
Try using –