Skip to main content

Forums

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

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

    Everton
    Participant

    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:

    CSS:

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

    HTML:

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

    Is that possible, please?

    #282183

    Beverleyh
    Participant

    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. http://fofwebdesign.co.uk/template/_testing/video/youtube-popup-modal.htm

    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