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.

718 questions
26
votes
1 answer

Cannot call method createDocumentFragment of undefined

I am trying to implement magnific popup I am having following link load json When I click the link, lightbox is in loading state and throws an exception as Uncaught TypeError: Cannot call method…
overflow
  • 3,684
  • 13
  • 41
  • 93
20
votes
3 answers

How to embed youtube video in magnific popup?

i have magnific popup plugin.but it not showing the video on popup How to embed youtube video in magnific popup?
Liju
  • 601
  • 1
  • 6
  • 16
18
votes
5 answers

I can't get magnific-popup animations to work

I've been through the excellent documentation for this and it's great. http://dimsemenov.com/plugins/magnific-popup/documentation.html I have the basic pop up working fine. My problem is with the animations. I just can't get them to work. Apologies…
pinkp
  • 735
  • 2
  • 8
  • 29
17
votes
2 answers

Creating action with Magnific Popup to Make Profile Photo Default

I could use help with creating a style sheet to override the default ones from Magnific Popup (https://github.com/joshuajansen/magnific-popup-rails). I have the code for a user to select their default_profile_id from their uploaded images. The…
xps15z
  • 1,559
  • 1
  • 18
  • 33
16
votes
2 answers

How to open a magnific popup on page load?

I'm using Magnific Popup and I would like to have a video come up as soon as the page loads in a popup. I got the plugin to work fine, but I have no idea on how to get it to pop up as soon as the page loads, without clicking on the thumbnail. I…
Bruno Gomes
  • 199
  • 1
  • 1
  • 8
13
votes
3 answers

Magnific popup - put arrows inside of an image

I put magnific popup to my site, to display Images in gallery. I love this tool, except one thing. The arrows for changing of images are displayed on the sides of screen, what is little bit inpractical when you have big screen with big resolution.…
marek_lani
  • 3,481
  • 4
  • 24
  • 44
12
votes
3 answers

why magnific popup ajax box closes if clicked on content

Please Please Please help me.. I have been trying to get the magnific popup ajax box to show login form. It seems that form appears but as soon as I click anywhere in form or ajax body, it disappears. below is the code $(document).ready(function()…
user2671781
  • 141
  • 1
  • 2
  • 11
12
votes
2 answers

Title for iframe/video in magnific popup

I need to show title/caption for video popup. In image type there is option for this, but none for video/iframe. In docs (http://dimsemenov.com/plugins/magnific-popup/documentation.html#iframe_type) I found example of templating markup but I don't…
Arkady
  • 347
  • 1
  • 2
  • 11
11
votes
6 answers

Magnific popup: Get current element in callback

In Magnific Popup, I want to get an attribute in the link that is clicked and use it in a callback function (using callbacks: open) to make some changes in the DOM. How can I do this? For example, in the code below, it should return 'it works' to…
Imme22009
  • 3,474
  • 5
  • 27
  • 47
11
votes
1 answer

Fire iframe type magnificPopup programmatically

I'm trying to figure out how to implement magnific popup from the onItemClick event of jquery.gantt. Fortunately, it lets us implement code via a self executing function which it passes data to from the clicked element. What I'm having issues with…
Crimius
  • 524
  • 1
  • 8
  • 23
10
votes
0 answers

Slick Slider setPosition for navigation

I am using Slick Slider within Magnific Popup. The slider can contain a couple of items, and has it's own thumbnail nav. Because the popup sets the slider to display:none I've use: $('.slider-products').slick('setPosition'); within a callback…
sarah3585
  • 627
  • 12
  • 35
9
votes
3 answers

Confirm Close - Only If User Types in Form Inside Magnific Popup

I am trying to get a confirm box to pop up ONLY if a user has made change to the form inside the magnific popup that shows it's content in an iframe.
Dennis
  • 672
  • 1
  • 9
  • 23
9
votes
9 answers

Magnific Popup: How to add a custom close button inside a popup form?

I have a form that opens up on a popup and have added a custom close button next to a submit button. This is a jQuery I am using for the close button: $(document).ready(function() { $('#close').click(function() { …
user1448031
  • 2,044
  • 11
  • 37
  • 81
9
votes
7 answers

Magnific Popup - Browser scrolls on the top on image click

I am using Magnific Popup plugin for displaying image in lightbox.When I click on the image in Chrome, the browser scrolls on the top, after that the menu is not clickable. $('.img-item').magnificPopup({ type: 'image', gallery:{ …
user3351236
  • 2,179
  • 8
  • 27
  • 41
8
votes
3 answers

How can style popup iframe in Magnific Pop-Up?

I want to show an iframe as in http://chesstao.com/test.php (click the green box). But I don't see a method or class to style the height and width of the iframe. HTML:
verlager
  • 1,262
  • 5
  • 20
  • 38
1
2 3
47 48