Simple Video Lightbox
How do I make an simple video lightbox?
A Simple method for creating a Lightbox like effect on a Vimeo Video.. What is a simple video lightbox? How do you make a simple video lightbox? This script and codes were developed by Saysora on 26 August 2022, Friday.
Simple Video Lightbox - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Simple Video Lightbox</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="wrap"> <div class="tryit"> <div class="title"> <h1>Simple Video Lightbox</h1> </div> <div class="list"> <div class="item"> <img src="http://placehold.it/800x310"> <iframe src="" width="800" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen class="hide" id="mtn"></iframe> <div class="close">X</div> </div> </div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Simple Video Lightbox - Script Codes CSS Codes
* { margin: 0; padding: 0;
}
body { background: #34495e; font-family: "Helvetica";
}
#wrap { width: 960px; min-height: 400px; margin: 40px auto; background: #27ae60; border: 5px solid #27ae60; padding: 10px 0;
}
#wrap:hover { background: #ecf0f1;
}
#wrap:hover h1 { color: #27ae60;
}
.title { width: 100%; padding: 10px; margin: auto; text-align: center;
}
h1 { font-size: 2ems; color: #ecf0f1;
}
.list { padding: 10px 10px 50px;
}
.list .item { padding: 5px; width: 800px; height: 310px; margin: 0 auto; z-index: 160; background: #27ae60;
}
#wrap { -webkit-transition: all 0.2s linear; -moz-transition: all 0.2s linear; -o-transition: all 0.2s linear; transition: all 0.2s linear;
}
.thefocus { margin: auto; position: absolute; top: 30%; left: 0; bottom: 0; right: 0; width: 800px; height: 300px; z-index: 1000;
}
.blackestnight { background: rgba(0, 0, 0, 0.9); min-height: 100%; height: 100%; width: 100%; position: absolute; z-index: 40; top: 0; left: 0;
}
.close { position: absolute; bottom: 5px; right: 8px; font-size: 5ems; font-weight: bolder; display: none; color: #000; cursor: pointer;
}
.close:hover { color: #e74c3c;
}
.show { display: block;
}
.hide { display: none;
}
Simple Video Lightbox - Script Codes JS Codes
$(document).ready(function(){ $('.item').click(function(){ $(this).addClass('thefocus'); $(this).children('.close').css('display', 'block'); $('body').after('<div class="blackestnight"></div>'); $(this).children('img').hide(); $(this).children('iframe').show(); $('#mtn').attr('src','//player.vimeo.com/video/22439234'); }); $('.close').click(function(e){ $('.blackestnight').hide(); $('.item').removeClass('thefocus'); $(this).css('display', 'none'); $('.item').children('img').show(); $('.item').children('iframe').hide(); $('#mtn').attr('src', ''); e.stopPropagation(); });
});
Developer | Saysora |
Username | azureknight |
Uploaded | August 26, 2022 |
Rating | 3.5 |
Size | 3,103 Kb |
Views | 32,384 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Simple Loading Bar | 2,513 Kb |
A Pen by Saysora | 2,253 Kb |
Life Mottos | 3,352 Kb |
First Loading Animation | 2,886 Kb |
CSS Tab Holder | 3,445 Kb |
Grow Circle Animation | 2,075 Kb |
Responsive Background | 2,168 Kb |
Landscape Animation | 3,469 Kb |
Clean Card Layout | 3,654 Kb |
Beautiful Ribbon | 1,985 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
CSS Link Icons with jQuery Titles | Nicwinn | 2,312 Kb |
Electric worm | Jeffibacache | 2,377 Kb |
Jquery 2d character movement | Drewtadams | 4,291 Kb |
Scroll to top button | DominicFrancois | 3,743 Kb |
Social buttons | Flacu | 2,022 Kb |
CSS Patterns | Alyda | 3,953 Kb |
Funny menu | AxeLVaisper | 4,671 Kb |
Dribbble Inspired Registration Form | Lancebush | 2,358 Kb |
E-mail Template | SoloMDFK | 4,871 Kb |
CSS Clip and Shape Module clearly | Pestov | 2,640 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!