English  Italiano  Français  Español  Dansk  Deutsch  Deutsch  Português  Suomi 
Video Lightbox

Is it possible to start youtube video jquery onClick from the link?

Dec 09, 2013

Q: Hi there,

I'm considering getting Video Lightbox, but wasn't sure if it can do what I needed. I'd like to create a text hyperlink (instead of a thumbnail) that then opens up a video light box.

Please advise. Thanks!

A: See how you should start the gallery onClick from the link.

1) Change the following code in the engine\js\videogallery.js

$("#videogallery a[rel]")


to

$("#videogallery a[rel],#watch")


2) Specify the link/image:

<a rel="#voverlay" href="http://www.youtube.com/v/31aWy9lcyJk" id="watch" title="Watch Video">Video</a>


3) Use 'display: none;' property for your gallery in the HEAD section of VisualLightBox.
Just change the following code:

#videogallery a img{
              display:block;
              border:none;
              margin:0;
                        }


to:

#videogallery a img{
              display:none;
              border:none;
              margin:0;
                        }

Related