I want add images to my lightbox2 gallery using javascript links. for example, I tried,
<script>imageArray =["image1.jpg","image2.jpg","image3.jpg"];function assignUrl(img_num){return "www.website/images/" + imageArray[img_num];}</script>
And in my gallery, I used,
<a href="javascript:document.location.href=assignUrl(0);" data-lightbox="imagegallery" ><img src="javascript:document.location.href=assignUrl(0);" <!-- thumbnail--> </a>
But it doesn't work.. The thumbnail doesn't show, and when u click, the image keeps loading but nothing happens.
When I use a test link like this, It displays the image.
<a href="javascript:document.location.href=assignUrl(0);"> TEST </a>
Please help? what am I doing wrong? Is there any other workaround this?