🌐
CodePen
codepen.io › kliedLABS › pen › DWZoww
Magnific-Popup Youtube Video
$(document).ready(function() { $('.popup-youtube').magnificPopup({ type: 'iframe' }); }); ! 999px · Clear · Ctrl Ctrl Space Autocomplete · F Find · G Find Next · ⇧ G Find Previous · ⇧ Opt F Find & Replace · ⇧ F Format Code · [ Indent Code Right ·
🌐
CodePen
codepen.io › gearmobile › pen › jWbZBB
Magnific Popup Video Link
$('#vimeo').magnificPopup({ items: { src: 'https://vimeo.com/148198462' }, type: 'iframe' }); $('#youtube').magnificPopup({ items: { src: 'https://www.youtube.com/watch?v=124qhYkJG2w' }, type: 'iframe' });
🌐
CodePen
codepen.io › mattlansom › pen › epRNpp
Magnific Popup Gallery with Videos
jQuery(document).ready(function() { jQuery('.popup-gallery').magnificPopup({ delegate: 'a', type: 'image', callbacks: { elementParse: function(item) { // Function will fire for each target element // "item.el" is a target DOM element (if present) // "item.src" is a source that you may modify console.log(item.el.context.className); if(item.el.context.className == 'video') { item.type = 'iframe', item.iframe = { patterns: { youtube: { index: 'youtube.com/', // String that detects type of video (in this case YouTube).
🌐
CodePen
codepen.io › townivan › pen › EVGKEq
magnific-popup example
$('.video').magnificPopup({ type: 'iframe', disableOn: function() { // don't use a popup for mobile if( $(window).width() < 600 ) { return false; } return true; }, iframe: { markup: '<div class="mfp-iframe-scaler">'+ '<div class="mfp-close"></div>'+ '<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+ '</div>', // HTML markup of popup, `mfp-close` will be replaced by the close button patterns: { youtube: { index: 'youtube.com/', // String that detects type of video (in this case YouTube).
🌐
CodePen
codepen.io › randhawa › pen › zjRwbe
Magnific Popup Image Video Gallery
/* Video Popup*/ jQuery(document).ready(function ($) { // Define App Namespace var popup = { // Initializer init: function() { popup.popupVideo(); }, popupVideo : function() { $('.video_model').magnificPopup({ type: 'iframe', mainClass: 'mfp-fade', removalDelay: 160, preloader: false, fixedContentPos: false, gallery: { enabled:true } }); /* Image Popup*/ $('.gallery_container').magnificPopup({ delegate: 'a', type: 'image', mainClass: 'mfp-fade', removalDelay: 160, preloader: false, fixedContentPos: false, gallery: { enabled:true } }); } }; popup.init($); });
🌐
CodePen
codepen.io › russel365 › pen › NqMwgq
Magnific Popup Examples video and image
$('.video').magnificPopup({ type: 'iframe', iframe: { markup: '<div class="mfp-iframe-scaler">'+ '<div class="mfp-close"></div>'+ '<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+ '<div class="mfp-title">Some caption</div>'+ '</div>' }, callbacks: { markupParse: function(template, values, item) { values.title = item.el.attr('title'); } } }); var groups = {}; $('.galleryItem').each(function() { var id = parseInt($(this).attr('data-group'), 10); if(!groups[id]) { groups[id] = []; } groups[id].push( this ); }); $.each(groups, function() { $(this).magnificPopup({ type: 'image', closeOnContentClick: true, closeBtnInside: false, gallery: { enabled:true } }) });
🌐
CodePen
codepen.io › finikkkk › pen › poZdazW
Image, Gallery, Youtube Video with Magnific Popup
// One Image $(".image-magnific").magnificPopup({ type: "image" }); // Gallery $(".gallery-magnific").magnificPopup({ type: "image", gallery: { enabled: true }, image: { titleSrc: function (item) { return ( item.el.find(".title").html() + `<small>${item.el.find(".author").html()}</small>` ); } } }); // Youtube Video $(".video-youtube").magnificPopup({ type: "iframe", removalDelay: 160, preloader: false });
🌐
CodePen
codepen.io › qm › pen › WJLKGg
Magnific Popup image and video slider
$('.popup-gallery').magnificPopup({ delegate: 'a', type: 'image', gallery: { enabled: true, navigateByImgClick: true, preload: [0,1] // Will preload 0 - before current, and 1 after the current image }, callbacks: { elementParse: function(item) { console.log(item.el[0].className); if(item.el[0].className == 'video') { item.type = 'iframe', item.iframe = { patterns: { youtube: { index: 'youtube.com/', // String that detects type of video (in this case YouTube).
🌐
CodePen
codepen.io › meladq › pen › CLqtk
Magnific Popup - Youtube
<button class="button" style="padding:20px;">Open popup</button> ! CSS Options · Format CSS · View Compiled CSS · Analyze CSS · Maximize CSS Editor · Minimize CSS Editor · Fold All · Unfold All · ! JS Options · Format JavaScript · View Compiled JavaScript · Analyze JavaScript · Maximize JavaScript Editor · Minimize JavaScript Editor · Fold All · Unfold All · $('.button').magnificPopup({ items: { src: 'https://www.youtube.com/watch?v=7eo8XpT4CmM' }, type: 'iframe', iframe: { markup: '<div class="mfp-iframe-scaler">'+ '<div class="mfp-close"></div>'+ '<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+ '</div>', patterns: { youtube: { index: 'youtube.com/', id: 'v=', src: '//www.youtube.com/embed/%id%?autoplay=1' } }, srcAction: 'iframe_src', } }); !
🌐
CodePen
codepen.io › YelyzavetaShvachko › pen › jaVKJN
magnific popup + background video
An online code editor, learning environment, and community for front-end web development using HTML, CSS and JavaScript code snippets, projects, and web applications.
Find elsewhere
🌐
CodePen
codepen.io › marimoman › pen › xxxEYXx
magnific popup youtube autoplay
$('.popup').magnificPopup({ type: 'iframe', mainClass: 'mfp-fade', removalDelay: 400, preloader: false, iframe: { patterns: { youtube: { index: 'youtube.com', id: 'v=', src: 'https://www.youtube.com/embed/%id%?rel=0&autoplay=1' } } }, }); ! 999px · Clear · Ctrl Ctrl Space Autocomplete ·
🌐
CodePen
codepen.io › dante9518 › pen › mVrppO
Custom iframe source / Magnific Popup
<a class="popup-youtube" href="https://player.vimeo.com/video/56930191?">Open The YouTube video</a> ! CSS Options · Format CSS · View Compiled CSS · Analyze CSS · Maximize CSS Editor · Minimize CSS Editor · Fold All · Unfold All · ! JS Options · Format JavaScript · View Compiled JavaScript · Analyze JavaScript · Maximize JavaScript Editor · Minimize JavaScript Editor · Fold All · Unfold All · $('.popup-youtube').magnificPopup({ type: 'iframe', iframe: { patterns: { vimeo_custom: { index: 'vimeo.com/', id: 'v=', src: 'https://15-lvl3-pdl.vimeocdn.com/01/1386/2/56930191/157932326.mp4?expires=1451076936&amp;token=02b519323bddbefd81c61' // URL that will be set as a source for iframe.
🌐
CodePen
codepen.io › webrav › pen › ZrBNQR
Video Pop Up on click image or link - Youtube, Vimeo
<!DOCTYPE html> <html lang="en"> ...dnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.css" /> </head> <body> <a class="popup-youtube" href="https://www.youtube.com/watch?v=pBFQdxA-apI">Open YouTube video</a><br> <a class="popup-vimeo" href="https://vimeo.co...
🌐
GitHub
gist.github.com › philbar › 7357321f491dd36f1343
Runs a Youtube Video in Magnific Popup. · GitHub
Runs a Youtube Video in Magnific Popup. GitHub Gist: instantly share code, notes, and snippets.
🌐
CodePen
codepen.io › collection › AzzLgA
Magnific Popup Examples - a Collection by Dmytro Semenov on CodePen
A bunch of different popups, modals and lightboxes created with help of Magnific Popup plugin .
🌐
CodePen
codepen.io › Khloe1425 › pen › ZEOLbWG
Magnific popup video
August 25, 2015 - An online code editor, learning environment, and community for front-end web development using HTML, CSS and JavaScript code snippets, projects, and web applications.
🌐
Dimsemenov
dimsemenov.com › plugins › magnific-popup › documentation.html
Magnific Popup Documentation
View example of retina popup on CodePen. Zooming only works for images, for now. To add zooming effect, first of make sure that you included “zoom” module to Magnific Popup build (since v0.9.1.).
🌐
CodePen
codepen.io › tag › magnific-popup
Pens tagged 'magnific-popup' 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?