Lightbox Plus Colorbox
Auto Launch (2 posts)

  1. leatherbarrow
    Posted 3 years ago #


    I am looking to get a youtube vid to automatically pop up in lightbox plus on my homepage.

    Can anyone advise how this is done.




  2. VeganPirate
    Posted 3 years ago #

    I have just achieved this on my site - example of it working for a picture: My test

    There are 2 main steps towards getting it to work.

    Firstly, in the plugin options you need to tick the "Add Inline Lightboxes" option. A new section will be displayed at the bottom of the page. For one of these options, choose to 'Auto Open'.

    Secondly, you need to add the code for the Inline Lightbox. This has 2 parts. Part 1 is the stuff you want displayed on the page itself (so maybe you want the video to be displayed there too, or if you want nothing, then use a 1x1 image which is essentially hidden). Part 2 is the inline part which is displayed in the lightbox. It consists of a hidden outer div, and an inner div that contains the content.

    This code makes a video pop up from (what looks like) nowhere. If you want the video to be on the page to, simply replace the image with the video's code:

    <a class="lbp-inline-link-2" title="movie" href="http://www.youtube.com/embed/grtJlJK7p5A"><img alt="" src="http://govegan.org.nz/pictures/blank.jpg" width="1" height="1" /></a>
    <div style="display: none;">
    <div id="lbp-inline-href-2" style="padding: 10px; background: #fff;"><iframe src="http://www.youtube.com/embed/grtJlJK7p5A" height="500" width="500" allowfullscreen="" frameborder="0"></iframe></div>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic