CodePen
codepen.io › TurnerZajac › pen › JVOWQX
Seamless & Simple Video Lightbox Popup
.ugb-video-popup { position: relative; margin: 0 auto; width: 100%; max-width: 600px; } .ugb-video-preview, a, .ugb-play-button { position: absolute; top: 0; left: 0; right: 0; bottom: 0; } .ugb-video-preview { background-size: cover; background-position: center; opacity: .4; transition: all .3s ease-in-out; z-index: 1; object-fit: fill; width: 100%; } .ugb-video-wrapper { position: relative; width: 100%; padding-bottom: 56.25%; } a { z-index: 3; box-shadow: none !important; background: transparent !important; display: block !important; color: #fff; text-decoration: none; } .ugb-play-button { z-index: 2; display: flex; justify-content: center; align-items: center; } svg { fill: #fff !important; } .modal-open-link { font-family: sans-serif; font-size: 25px; color: #464646; width: 50px; height: 100px; line-height: 100px; text-align: center; }
CodePen
codepen.io › mohitkamboj943 › pen › vYEyBOe
HTML 5 Video playing in a lightbox
<h1>CSS/Javascript popup with Lightbox effect</h1> <div id="light"> <a class="boxclose" id="boxclose" onclick="lightbox_close();"></a> <video id="VisaChipCardVideo" width="600" controls> <source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4"> <!--Browser does not support <video> tag --> </video> </div> <div id="fade" onClick="lightbox_close();"></div> <div> <a href="#" onclick="lightbox_open();"><img src="http://i.huffpost.com/gen/749263/original.jpg"/></a> </div> <div class="test">test</div> <div class="test2">test2</div>
Videos
CodePen
codepen.io › angelpolitis › pen › KMdgwx
Video Lightbox
LINK: https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css--> <!--Also remember to include the latest version of jQuery in order for the script to work LINK: https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js--> <button id = "button"><i class = "fa fa-play" aria-hidden = "true"></i></button> <div id = "lightbox"> <i id = "close-btn" class="fa fa-times"></i> <div id = "video-wrapper"> <iframe id = "video" width="960" height="540" src = "https://www.youtube.com/embed/lJfqK9bgIng" frameborder = "0" allowfullscreen></iframe> </div> </div>
CodePen
codepen.io › oread77 › pen › QWMzpRd
Simple Lightbox with Video or Image
$('body').append(` <div class="lightbox"> <a href="#lightbox" class="lightbox-close lightbox-toggle">X</a> <div class="lightbox-container"> <div class="row"> <div class="col-sm-12 lightbox-column"> </div> </div> </div> </div> `); $('.lightbox-toggle').on('click', (event) => { event.preventDefault(); $('.lightbox').fadeToggle('fast'); let context = $(event.currentTarget).attr('data-lightbox-type'); let content = $(event.currentTarget).attr('data-lightbox-content'); console.log(event); if (context == 'video') { $('.lightbox-column').append(` <div class="lightbox-video"> <iframe src="${content}"
HubSpot
community.hubspot.com › t5 › CMS-Development › How-to-Create-Video-Lightbox-Popup › m-p › 210424
Solved: HubSpot Community - Re: How to Create Video Lightbox Popup? - HubSpot Community
December 6, 2022 - Hello, I'd like to create a video lightbox popup to be triggered by an image thumbnail of the video. Does anyone have template code/instructions? Thanks in advance! FYI trying to find something free, don't want to pay $100/month for Wistia, etc. Solved! Go to Solution. ... with a text widget. After that you can place the module everywhere you want/need and drop any vimeo link in it without needing any coding skills. For youtube videos go with this CodePen ...
CodePen
codepen.io › ChidVanid › pen › EKJgBP
Simple Lightbox with Video or ImageChidVanid
$('body').append(` <div class="lightbox"> <a href="#lightbox" class="lightbox-close lightbox-toggle">X</a> <div class="lightbox-container"> <div class="row"> <div class="col-sm-12 lightbox-column"> </div> </div> </div> </div> `); $('.lightbox-toggle').on('click', (event) => { event.preventDefault(); $('.lightbox').fadeToggle('fast'); let context = $(event.currentTarget).attr('data-lightbox-type'); let content = $(event.currentTarget).attr('data-lightbox-content'); console.log(event); if (context == 'video') { $('.lightbox-column').append(` <div class="lightbox-video"> <iframe src="${content}"
CodePen
codepen.io › chaly7500 › pen › WPGMKb
Video lightbox Gallery
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>jQuery Lightbox</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.0.47/jquery.fancybox.min.css" /> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" /> </head> <body> <div class="container"> <div class="row"> <div class="col-md-4"> <div class="thumbnail"> <a data-fancybox="video-gallery" href="https://www.youtube.com/watch?v=v9aVd6qnEjA&autoplay=1"><img src="http://i3.ytimg.com/vi/v9aVd6qnEjA/maxresd
CodePen
codepen.io › DonnaG › pen › DOqWGM
Video Pop-up in pure CSS.
/** Donna Galletta | LIGHTBOX MARKUP **/ .lightbox { /** Default lightbox to hidden */ display: none; /** Position and style */ position: fixed; z-index: 999; width: 100%; height: 100%; text-align: center; top: 0; left: 0; background: rgba(0,0,0,0.8); } .lightbox:target { /** Remove default browser outline */ outline: none; /** Unhide lightbox **/ display: block; } /** videoModal **/ #videoModal { border-radius: 0; width: 870px; margin:auto;} #videoModal .modal-header { background: #000; border: 0; color: #fff; position: relative; height:35px; } #videoModal .modal-header h3 { font-size: 18px;
CodePen
codepen.io › DocZaious › pen › eYNZogR
Video Gallery, Hover Effects, Lightbox
Helens</h2> <p>The one and only</p> </div> <a class="vimeo-popup" href="https://vimeo.com/171540296"></a> </div> </div> </div> </div> ... body { font-family: 'Overpass', sans-serif; } .section-header { text-align: center; margin: 60px auto 20px auto; font-family: 'Montserrat', sans-serif; font-size: 36px; font-weight: 400; text-transform: uppercase; color: #222; } .section-header-underline { border: 1px solid #222; width: 3rem; margin: 0 auto; margin-bottom: 30px; } .video-gallery { position: relative; margin: 0 auto; max-width: 1000px; text-align: center; } .video-gallery .gallery-item { posi
Biati-digital
biati-digital.github.io › glightbox
GLightbox | A pure Javascript lightbox
Code name "Gie" A Pure Javascript lightbox with mobile and video support.
CodePen
codepen.io › darcyvoutt › pen › MaamWg
YouTube Responsive Lightbox
<div id="container"> <center> <p>Open the lightbox with below button</p> <button id="playme" onclick="revealVideo('video','youtube')">Play Video</button> </center> </div> <div id="video" class="lightbox" onclick="hideVideo('video','youtube')"> <div class="lightbox-container"> <div class="lightbox-content"> <button onclick="hideVideo('video','youtube')" class="lightbox-close"> Close | ✕ </button> <div class="video-container"> <iframe id="youtube" width="960" height="540" src="https://www.youtube.com/embed/WsptdUFthWI?showinfo=0" frameborder="0" allowfullscreen></iframe> </div> </div> </div> </div>
CodePen
codepen.io › tag › lightbox
Pens tagged 'lightbox' on CodePen
CodePen doesn't work very well without JavaScript · We're all for progressive enhancement, but CodePen is a bit unique in that it's all about writing and showing front end code, including JavaScript. It's required to use most of the features of CodePen · Need to know how to enable it?
CodePen
codepen.io › bruno_severiano › pen › xoRmyY
Video Lightbox example
<div class="container"> <ul class="list-inline pt-5 mt-5"> <li class="list-inline-item"> <a href="https://www.youtube.com/watch?v=GUd4l6FHcXk" data-lity class="box-video"> <video class="video" muted autoplay displaysinline loop> <source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4"> Your browser does not support HTML5 video.
CodePen
codepen.io › davidleduc › embed › EPrgqY
CodePen Embed - HTML 5 Video playing in a lightbox
<h1>CSS/Javascript popup with Lightbox effect</h1> <div id="light"> <a class="boxclose" id="boxclose" onclick="lightbox_close();"></a> <video id="VisaChipCardVideo" width="600" controls> <source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4"> <!--Browser does not support <video> tag --> </video> </div> <div id="fade" onClick="lightbox_close();"></div> <div> <a href="#" onclick="lightbox_open();">Watch video</a> </div> <div class="test">test</div> <div class="test2">test2</div>
CodePen
codepen.io › Avalai › pen › WjaPrz
jQuery Youtube Lightbox
$(document).ready(function(){ //If iframe exists on page if ( $('iframe').length >= 1 ) { // Inject YouTube API script var tag = document.createElement('script'); tag.src = "https://www.youtube.com/player_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); // On click of element with class .open-yt-lightbox //Firefox needs you to manually hold ( event ), Chrome does not $('.open-yt-lightbox').click(function( event ){ // Prevent link from opening youtube // You don't need to link to YT since it's getting the element
CodePen
codepen.io › chedaman › pen › BRgqEg
youtube lightbox
/* NOT SO NECESSARY STYLES */ .youtube-button{ width: calc(33% - 4px); display: inline-block; cursor: pointer; position: relative; } .youtube-button span{ font-size: 36px; color: white; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); } @media(max-width: 600px){ .youtube-button{ width: 100%; } .youtube-button span{ font-size: 24px; } } /* BEGIN LIGHTBOX STYLES */ .lbb{ position:fixed; top:0; left:0; height:100%; width:100%; background-color:rgba(0,0,0,0.6); opacity:0; transition: opacity 0.2s; } .lb-ext{ position:relative; top:50%; transform: translateY(-50%); margin: auto; padding: 0 10%; height:auto; max-width:1200px; border-radius: 2px; } .lb-int{ height: auto; background-color: black; text-align: center; border-radius: 2px; box-shadow: 0 0 70px 30px rgba(0,0,0,0.3); } .lb-info-block{ margin: 0 0 20px; }
CodePen
codepen.io › team › rcrooks1969 › pen › OOJyoL
Single Video Lightbox
// Get a reference to the video poster image and the lightbox var myPlayer, eContainer = document.getElementById("container"), eLightbox = document.getElementById("playerLightbox"); videojs.getPlayer('myPlayerID').ready(function() { // Get a reference to the player myPlayer = this; // +++ Wait for loadstart +++ // Listen for the loadstart event myPlayer.on('loadstart',function(){ var str = ""; // Get the video's poster image and use it in the img tag str += '<img src="' + myPlayer.mediainfo.posterSources[0].src + '" alt="' + myPlayer.mediainfo.name + '" width="100%" height="100%"/>'; eContaine
CodePen
codepen.io › vavik96 › pen › BRKbNq
Responsive Youtube/Vimeo Video Lightbox With Vanilla JavaScript – MediaBox
/*! mediabox v0.0.2 | (c) 2016 Pedro Rogerio | https://github.com/pinceladasdaweb/mediabox */ (function (root, factory) { "use strict"; if (typeof define === 'function' && define.amd) { define([], factory); } else if (typeof exports === 'object') { module.exports = factory(); } else { root.MediaBox = factory(); } }(this, function () { "use strict"; var MediaBox = function (element) { if (!this || !(this instanceof MediaBox)) { return new MediaBox(element); } this.selector = document.querySelectorAll(element); this.root = document.querySelector('body'); this.run(); }; MediaBox.prototype = { run
HubSpot
community.hubspot.com › t5 › CMS-Development › How-to-Create-Video-Lightbox-Popup › m-p › 210275
Solved: HubSpot Community - How to Create Video Lightbox Popup? - HubSpot Community
December 6, 2022 - Hello, I'd like to create a video lightbox popup to be triggered by an image thumbnail of the video. Does anyone have template code/instructions? Thanks in advance! FYI trying to find something free, don't want to pay $100/month for Wistia, etc. Solved! Go to Solution. ... with a text widget. After that you can place the module everywhere you want/need and drop any vimeo link in it without needing any coding skills. For youtube videos go with this CodePen ...