Skip to main content


This topic contains 1 reply, has 2 voices, and was last updated by  Beverleyh 4 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #281032


    I have two thumbnails on a page that, when clicked, open in a pop-up lightbox to see larger versions of the same image. So, for example, thumb-1.jpg opens violin.jpg, while thumb-2.jpg opens jump.jpg. This is the code:


    .link {
    width: 50%;
    margin-left: auto;
    margin-right: auto;


    Instead of opening larger images when a thumbnail is clicked, I would like to display a MP4 file with controls.

    Is that possible, please?



    It’s possible with JavaScript. Here’s a demo that loads a YouTube video (iframe embed code) into a modal popup but you can edit the HTML in the JS function so that it inserts your video markup instead of the iframe video embed markup.

    Note that the function is using the video src/address in the text link’s href attribute. You’d wrap the link around your thumbnail image instead of text.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

icon-link icon-logo-star icon-search icon-star