Is it possible to open the jquery lightbox drupal from the button?

Q: Dear Support,

I test your program and I am interested in it. I would like to know is it possible to start the gallery using the button, not the thumbnail, so the user can click on it and open the gallery?

A: To start the gallery from the button you should:

1) Open vlightbox.css file in any text editor and find the following code:

#vlightbox1 .vlightbox1 {
	display:-moz-inline-stack;
	display:inline-block;
	zoom:1;
...


and change display:inline-block; to display:none;

It will look like:

#vlightbox1 .vlightbox1 {
	display:-moz-inline-stack;
	display:none;
	zoom:1;
...



So, now all the thumbnails are invisible.

2)Open your html page in any text editor and set the button instead of thumbnail you want to use as a button, for example you should change:

<a class="vlightbox1" href="index_files/vlb_images1/9.jpg" title="9"><img src="index_files/vlb_thumbnails1/9.jpg" alt="9"/></a>


to:

<a class="vlightbox1" href="index_files/vlb_images1/9.jpg" title="9"><button type="button">Click here to watch the gallery</button></a>


3) Open your html page in any text editor and set style="display:inline-block;" to make the button visible:

<a class="vlightbox1" href="index_files/vlb_images1/9.jpg" title="9" style="display:inline-block;"><img src="index_files/vlb_thumbnails1/9.jpg" alt="9"/></a>

Related