Jump to content

How can I open video in lightbox by clicking on button?

Recommended Posts

I have the button on the page "Watch How"

I want to open a Lightbox with embeded youtube video after button has been clicked.

I created a gallery with video and Lightbox enabled on the separate page and placed it in "not linked section"

Now trying to figure out how to trigger lighbox with video to open by clicking on the button.

My button is made with code:


<div class="watch-how-button">
<p>Watch How</p>
</div>

My Video ID is: yui317251501786830957615

I am following this tutorial:

https://answers.squarespace.com/questions/82227/button-that-pops-up-a-video-lightbox.html

I can't figure out how to:

Then, create a link anywhere you want with this updated to your video ID:

javascript:jqueryLightbox('yui317251501786830957615');

And how to link this to the button.

The script code was added to the code injection section.

Any help would be greatly appreciated. Thanks!

Link to comment
  • Replies 1
  • Views 6.2k
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.