0

I am looking for solution to open lightbox ( images ) when click on the link.

Example:

<a href="">View Gallery</a>

Here is my working image code with lightbox within foreach loop

echo '<a href="'.$media_url.$image_name.'" rel="lightbox['.$pid.']" title="Post: '.$pid.' |  '.$ptitle.' | Image: '.$image_name.' | by: '.$m_uname.' " ><img src="'.$thumb_path.$image_name.'" alt="'.$media->image_name.'" width="56" class="rm-thumbs-list" /></a>';

I have foreach loop and above code working fine with no issues. It is opening images in lightbox when the user clicks on the thumbnail. However now I have changed my mind. I am going to remove thumbnails and will add only one simple link when the user clicks on View Gallery I want to open lightbox with all the images

4

1 回答 1

0

您只需要添加hrefpage ,下面gallery.html是存储所有图像的页面。

<a href="gallery.html" rel="lightbox">View Gallery</a>
于 2013-03-09T18:07:36.053 回答