Questions tagged [magnific-popup]

Magnific Popup is a responsive lightbox & dialog script with focus on performance and providing best experience for user with any device (for jQuery or Zepto.js).

Magnific Popup is a responsive lightbox & dialog script with focus on performance and providing best experience for user with any device.

Official Site: http://dimsemenov.com/plugins/magnific-popup/


Light and modular

You can choose to include only the features that you need using the online build tool or by compiling it yourself with Grunt.js. Size of core JS file is about 3KB + each module weighs about 0.5KB (gzipped). Sass CSS preprocessor is used for easier skinning, but you're not obligated to use it.

Content is resized with CSS

The majority of lightbox plugins require you to define size of it via JS option. Magnific Popup does not - feel free to use relative units like EM's or resize lightbox with help of CSS media queries. Update content inside lightbox without worrying about how it'll resize and center.

Fast

Magnific Popup displays images before they're completely loaded to take full advantage of progressive loading. For in and out transitions CSS3 is used instead of slow JavaScript animation.

High-DPI (Retina) display support

Default controls are made with pure CSS, without external graphics. For the main image there is a built in way to provide appropriate source for different pixel density displays.

Conditional lightbox

Plugin has an option to automatically switch to alternative mobile-friendly source on small screen size. Brad Frost has a terrific article about this technique.

Memory management

Popup has an extendable micro templating engine that reuses existing DOM elements (example), which is especially useful when your popups same pattern.

733 questions
6
votes
1 answer

Dynamically add items to Magnific Popup gallery

Is there any way to dynamically add gallery items in Magnific Popup that is already open? (or update the current item). Can't find anything about in in plugin docs.
Marvin3
  • 5,741
  • 8
  • 37
  • 45
6
votes
2 answers

Magnific Popup action before close

I have implemented Magnific Popup in my solutions and I am using Bootbox to get confirmation from the user that he wants to close the window without saving changes, etc. I hooked up my custom function to close callback but it doesn't work as…
Tobiasz
  • 1,059
  • 1
  • 12
  • 29
6
votes
1 answer

Multiple Galleries with Magnific Popup

I'm trying to create a page with a few galleries using the Magnific-Popup jQuery plug-in. I different sections contained in divs with separate ids and a .gallery class containing the images.

Some content

PnkNja15
  • 61
  • 1
  • 1
  • 3
5
votes
1 answer

Get error "TypeError: Cannot read property 'object' of undefined" when import "React-Magnific-Popup" package

I'm using react-magnific-popup package, but when I import anything from that package I get this error "TypeError: Cannot read property 'object' of…
5
votes
1 answer

Right approach to apply a HTML/CSS/JS theme to an React app

I've been trying to apply a template I bought on themeforest.net to my React web app. Converting template's HTML/CSS part to React components is relatively easy, however, I found it challenging to get the jQuery part to work. The template uses…
Chris Chen
  • 5,307
  • 4
  • 45
  • 49
5
votes
4 answers

Unable to remove related videos in youtube

I have embedded a video with magnificpopup script. I am unable to remove related videos at the end of the reproduction of a youtbe embedded. Here is the code I have tried:
emanuele
  • 2,519
  • 8
  • 38
  • 56
5
votes
2 answers

magnific popup requires clicking twice to open image slider

I have a scenario where my code to display image thumbnails are loaded into the DOM dynamically. Upon clicking the thumbnail, I want to load the full image using maginfic popup. Following is my view :
Purusartha
  • 992
  • 4
  • 19
  • 33
5
votes
4 answers

how to open popup within popup in magnific popup plugin

can anybody tell me how to open popup within popup using magnific-popup jquery plugin (using ajax). $('.ajax-popup-link').magnificPopup({ type: 'ajax' }); Link 1 on "path-to-file.html"
Yogesh Saroya
  • 1,401
  • 5
  • 23
  • 52
5
votes
1 answer

How to customize arrows and close button?

I would like to customize and position (replace with custom images jpg/png) the arrows & close button. Any help would be appreciated.
user2991564
  • 51
  • 1
  • 3
5
votes
1 answer

How to load another HTML file in Magnific Popup with the AJAX function?

How do I load another HTML file (on the same server) in a Magnific Popup, AJAX type? I looked at the source code of http://dimsemenov.com/plugins/magnific-popup/ but I can't get it to work. Other popup types are working fine, such as images, video's…
user2931021
5
votes
1 answer

How do I define a gallery of inline content in HTML for use with Magnific-Popup ?

I have many galleries on a page which are launched from their respective buttons. I like the idea of defining the markup for the galleries in the page alongside the button and then hiding using the .mfp-hide. However I cannot get the popup to…
Brendan
  • 18,771
  • 17
  • 83
  • 114
5
votes
2 answers

magnific-popup passing a variable

I'm trying to make magnific popup contain some forms. I would like to pass variables through the html anchor to the final popup. As Var1 in this pseudocode: Show…
Johann
  • 298
  • 2
  • 11
5
votes
2 answers

How to implement or create a Magnific Popup?

Intro: This is a question from a newbie amateur designer-wannabe on how to properly create a Magnific Popup. So, this might sound a little noobish, but that's because I'm a newbie. What I want to know: I want to know how to create a Magnific Popup,…
chest_nut
  • 195
  • 1
  • 2
  • 11
5
votes
5 answers

Magnific Popup - Error when opening a you tube video

Can not get a video to play in the magnific pop up window. When I use class=iframe, the page will redirect to youtube and play the video. But when I use class=popup-youtube, the popup will display, but I receive the following error message: This…
Phil
  • 45
  • 1
  • 1
  • 4
5
votes
1 answer

Magnific-Popup, Limit items to direct siblings

How can I limit magnific-popup gallery to direct siblings? When I open an image from the first .child, I don’t want the images from the second .child to be in the gallery. The html structure:
gang
  • 1,758
  • 2
  • 23
  • 36
1 2
3
48 49