๐ŸŒ
Dimsemenov
dimsemenov.com โ€บ plugins โ€บ magnific-popup โ€บ documentation.html
Magnific Popup Documentation
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.). Then follow steps: 1) Add the thumbnail with link that will open the popup, for example:
๐ŸŒ
GitHub
gist.github.com โ€บ hirejordansmith โ€บ 1ac659aadc1d720f505b28a1540d6547
How to show images and video in Magnific Popup Gallery ยท GitHub
<script> $(document).ready(function() { $('.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) { if(item.el[0].className == 'video') { item.type = 'iframe'; } else { item.type = 'image'; } } }, }); }); </script> ... callbacks: { elementParse: function(item) { if(item.el.hasClass("multiple_gallery_video")){ console.log("multiple_gallery_video") item.type = 'iframe'; }else { item.type = 'image'; } console.log(item); // Do whatever you want with "item" object } },
Discussions

magnific popup as gallery - concrete5
Hello, Do do what you want you need a div with a class name wrapping all the thumbnails. Then you need to call Magnific popup on that div and specify that it's a gallery ike so: More on archive.concretecms.org
๐ŸŒ archive.concretecms.org
July 19, 2015
CouchCMS โ€ข View topic - Dynamically generate thumbnails for Magnific Popup Gallery
I am currently building a one page lightbox gallery grid with the Magnific Popup plugin (http://dimsemenov.com/plugins/magnific-popup/). The gallery contains differently sized images. If you click on a thumbnail in the grid (which have to be sized all equally 200 x 200 pixel), the lightbox pops up. More on couchcms.com
๐ŸŒ couchcms.com
April 4, 2015
How can I combine inline elements with images in magnific popup having a displayed gallery
My problem is that in the mixed ... like a gallery but with one inline element in between. The inline element will have a thumbnail (and actual image), but when clicked will be an inline element. I was able to do it with fancybox and you can see here if you click the thumbnails, it might help clarify what I need. (I am trying to achieve the same thing with Magnific popup with because ... More on stackoverflow.com
๐ŸŒ stackoverflow.com
How can I get magnific popup to show both images and an iframe video in one dynamic gallery?
๐ŸŒ stackoverflow.com
July 19, 2015
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 37023589 โ€บ advanced-gallery-with-thumbnails-and-preview-image-with-magnific-popup
jquery - Advanced gallery with Thumbnails and Preview image with Magnific popup - Stack Overflow
August 9, 2016 - Logic: 1. after clicking on Thumbnails -> the image in Preview should be changed (that works OK) 2. after clicking on Preview image -> it should open the Magnific gallery but with gallery set from Thumbnails.
๐ŸŒ
CodePen
codepen.io โ€บ gyduxa โ€บ pen โ€บ YwKmzM
magnific popup with thumbnails
$('.gallery').magnificPopup({ delegate: 'a', type: 'image', tLoading: 'Loading image #%curr%...', mainClass: 'mfp-img-mobile', gallery: { enabled: true, navigateByImgClick: true, preload: [0,1] // Will preload 0 - before current, and 1 after the current image }, image: { tError: '<a href="%url%">The image #%curr%</a> could not be loaded.', titleSrc: function(item) { //return //item.el.attr('title'); var $gallery = $('.gallery'); var $result = ''; if ($gallery.find('li').length>0) { $result = '<div class="mfp-pager">' + '<div class="arrow_prev">' + '<button type="button" class="prev arrow" oncl
๐ŸŒ
concrete5
archive.concretecms.org โ€บ community โ€บ forums โ€บ 5-7-discussion โ€บ magnific-popup-as-gallery
magnific popup as gallery - concrete5
July 19, 2015 - Hello, Do do what you want you need a div with a class name wrapping all the thumbnails. Then you need to call Magnific popup on that div and specify that it's a gallery ike so:
๐ŸŒ
GitHub
github.com โ€บ dimsemenov โ€บ Magnific-Popup โ€บ issues โ€บ 224
Thumbnail navigation ยท Issue #224 ยท dimsemenov/Magnific-Popup
September 28, 2013 - Hello I also think this is a very interesting feature to make magnific popup more complete. I needed to myself, so I've made a codepen with thumbnails inside a gallery: http://codepen.io/gyduxa/pen/YwKmzM
๐ŸŒ
Couchcms
couchcms.com โ€บ forum โ€บ viewtopic.php
CouchCMS โ€ข View topic - Dynamically generate thumbnails for Magnific Popup Gallery
April 4, 2015 - I am currently building a one page lightbox gallery grid with the Magnific Popup plugin (http://dimsemenov.com/plugins/magnific-popup/). The gallery contains differently sized images. If you click on a thumbnail in the grid (which have to be sized all equally 200 x 200 pixel), the lightbox pops up.
๐ŸŒ
SoloDev
solodev.com โ€บ blog โ€บ web-design โ€บ adding-magnific-popup-to-your-photo-gallery.stml
Adding Magnific Popup to your Photo Gallery
September 28, 2016 - Graphics have taken on an increasingly ... more prevalent. In this article we will show you how to add magnific popup by Dmitry Semenov to your photo gallery turning your photos into clickable and expandable elements with further detail....
Find elsewhere
๐ŸŒ
Dimsemenov
dimsemenov.com โ€บ plugins โ€บ magnific-popup
Magnific Popup: Responsive jQuery Lightbox Plugin
You may put any HTML content in each gallery item and mix content types. In this example lazy-loading of images is enabled for the next image based on move direction. If you wish to add touch-swipe support, check my article on the Smashing Magazine, or new PhotoSwipe script. If you wish to open the popup only after image is fully loaded, you may preload image via JS. Or use scaled down image instead of thumbnail.
๐ŸŒ
Jinbo
bogun.jinbo.net โ€บ 2020 โ€บ files โ€บ inspector-gadget-twem โ€บ 33af67-magnific-popup-gallery-with-thumbnails
magnific popup gallery with thumbnails
Itโ€™s a Fast, light, mobile-friendly, and responsive lightbox and modal dialog plugin. HTML and CSS responsive image/photo gallery: flexbox, grid, lightbox, with thumbnails, etc. Ideally, equally sized thumbnails (200 x 200 px), are dynamically generated from โ€ฆ Magnific Popup version 0.9.9.
๐ŸŒ
Justified Image Grid
justifiedgrid.com โ€บ home โ€บ lightboxes โ€บ magnific popup
Magnific Popup - Justified Image Grid - WordPress Gallery
April 28, 2016 - One thumbnail can open multiple photos in Magnific Popup. It's a unique Justified Image Grid feature, everything is set up for you behind the scenes. This is possible with these sources: NextGEN Galleries / Tag albums, WP Real Media Library ...
๐ŸŒ
Drupal
drupal.org โ€บ project โ€บ magnific_popup
Magnific Popup | Drupal.org
February 13, 2024 - Activate the Magnific Popup module, ... Gallery Style options on the field. An example "Photo Gallery" Image field: By default, item thumbnails will use the "magnific_popup_thumbnail" Image Style....
๐ŸŒ
Drupal
drupal.org โ€บ project โ€บ magnific_popup โ€บ issues โ€บ 3064887
Add gallery type option for large first thumb and smaller secondary thumbs [#3064887] | Drupal.org
June 28, 2019 - The first large thumbnail does not change when clicking a smaller one. I made some adjustments to the formatter and the popup js to accomplish this. I didn't include any css to lay out the smaller thumbs as that could be done by the site theme. With these changes the user can select a new gallery type and set the image style for the smaller images.
๐ŸŒ
Design Link Work
designlink.work โ€บ magnific-popup
Magnific Popup #1. basic image lightbox - Magnific Popup is jQuery lightbox plugin. Here, basic image lightbox setting of Magnific Popup are posted. | Design Link Work
June 28, 2019 - <!-- Add jQuery and Magnific Popup --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.min.css"> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-popup.min.js"></script> ... <script> $(function () { $(".gallery").magnificPopup({ option }); }); </script> <a href="image.jpg" class="gallery" title="My caption"> <img src="thumbnail.jpg" alt="" /> </a>
๐ŸŒ
Technical Manuals
manuals.muthu.co โ€บ posts โ€บ javascript-libraries-and-functions โ€บ magnific-popup.html
Magnific Popup - Documentation โ€“ Technical Manuals
November 30, 2023 - The navigation behavior is handled automatically through the gallery options. Magnific Popup doesnโ€™t inherently display thumbnails within the gallery itself.
๐ŸŒ
Simmons University
web.simmons.edu โ€บ ~grovesd โ€บ comm244 โ€บ notes โ€บ week13 โ€บ magnific โ€บ magnific
How to Use Magnific | Comm244 Notes
You should then decide on a thumbnail size and prepare a thumbnail for each of your images. You should save all of the images in your images folder. The neat part about this kind of thing is that we don't have to do very much to our HTML in order for Magnific to work.
Top answer
1 of 4
12

Here is a simple solution I've used for this:

$('.image-link, .video-link').magnificPopup({
    callbacks: {
      elementParse: function(item) {
         // the class name
         if(item.el.context.className == 'video-link') {
           item.type = 'iframe';
         } else {
           item.type = 'image';
         }
      }
    },
    gallery:{enabled:true},
    type: 'image',
});

It should work with type formatters.

2 of 4
6

You are able to define the type ofa gallery item using the mfp-TYPE CSS class. So in this case you would add mfp-iframe to the anchor tag pointing to your video and the plugin will handle the rest.

HTML:

<div class="gallery">
  <!-- Image -->
  <a href="https://www.example.com/image-fullsize-1.jpg">
     <img src="https://www.example.com/image-thumbnail-1.jpg" alt="">
  </a>

  <!-- Video item with mfp-iframe class -->
  <a href="https://www.example.com/video-url" class="mfp-iframe">
     <img src="https://www.example.com/video-thumbnail.jpg" alt="">
  </a>

  <!-- Image -->
  <a href="https://www.example.com/image-fullsize-2.jpg">
     <img src="https://www.example.com/image-thumbnail-2.jpg" alt="">
  </a>

  <!-- Image -->
  <a href="https://www.example.com/image-fullsize-3.jpg">
     <img src="https://www.example.com/image-thumbnail-3.jpg" alt="">
  </a>
</div>

JS:

$('.gallery').magnificPopup(
        {
            delegate: 'a',
            type: 'image',
            tLoading: 'Loading image #%curr%...',
            mainClass: 'mfp-img-mobile',
            gallery: {
                enabled: true,
                navigateByImgClick: true,
                preload: [0,1] // Will preload 0 - before current, and 1 after the current image
            },
            image: {
                tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
                titleSrc: function(item) {
                    return '';
                }
            }
        }
    );

More information can be found in the documentation:

http://dimsemenov.com/plugins/magnific-popup/documentation.html#content-types

๐ŸŒ
CodePen
codepen.io โ€บ Media-Ed-Online โ€บ pen โ€บ YarVzd
Responsive Gallery w/ Magnific Popup
Multi-type gllery, made responsive using flexbox and interactive with Magnific Popup. This gallery allows for different thumbnails, filetype icons (fo...
๐ŸŒ
Hire Jordan Smith
hirejordansmith.com โ€บ show-images-iframe-video-magnific-popup-gallery
How To Show Images & Iframe Video in Magnific Popup Gallery
February 13, 2024 - A quick way to show images and iframe video in a Magnific Popup Gallery.
Price ย  $$$
Call ย  918-998-3194
Address ย  4815 S Sheridan Rd Suite 106, 74145, Tulsa