Magnific Popup

Magnific Popup is a responsive lightbox & dialog script that focuses on performance and provides a great user experience. It’s optimized for both desktop and mobile devices, offering fast, smooth animations and native-feeling gestures. The plugin is designed to be lightweight, flexible, and easy to integrate into various projects.


  1. Responsive: Adapts to any screen size, ensuring a consistent user experience across devices.
  2. Fast Performance: Built with performance in mind, offering smooth animations without lag.
  3. Gallery Support: Allows for the creation of beautiful image galleries with navigation controls.
  4. Inline Content: Display inline content, videos, iframes, and AJAX-loaded content.
  5. Customizable: Offers numerous settings and callbacks to tailor the popup to your needs.


  • User-Friendly: Provides a seamless user experience with intuitive controls.
  • Lightweight: Doesn’t bloat your website, ensuring faster load times.
  • Versatile: Suitable for various content types, from images to videos to AJAX-loaded content.
  • Accessibility: Built with accessibility in mind, ensuring it’s usable for everyone.


Getting Started:

To get started with Magnific Popup, you can include it in your project using a CDN or download it directly from the official website.

<!-- Magnific Popup CSS -->
<link rel="stylesheet" href="">
<!-- jQuery library -->
<script src=""></script>
<!-- Magnific Popup JS -->
<script src=""></script>


Basic Image Popup:

<a class="image-popup" href="path_to_large_image.jpg">
    <img src="path_to_thumbnail.jpg" alt="Description">
  $(document).ready(function() {
      type: 'image'

Image Gallery:

<div class="gallery">
    <a href="image1_large.jpg" title="Image 1"><img src="image1_thumb.jpg" alt="Thumbnail 1"></a>
    <a href="image2_large.jpg" title="Image 2"><img src="image2_thumb.jpg" alt="Thumbnail 2"></a>
    <a href="image3_large.jpg" title="Image 3"><img src="image3_thumb.jpg" alt="Thumbnail 3"></a>
    <!-- More images here -->
    delegate: 'a',
    type: 'image',
    gallery: {
      enabled: true

AJAX Content Popup:

<a href="ajax-content.html" class="ajax-popup">Load AJAX Content</a>
    type: 'ajax'

Video Popup (e.g., YouTube):

<a href="" class="video-popup">Watch Video</a>
    type: 'iframe',
    iframe: {
      patterns: {
        youtube: {
          index: '',
          id: 'v=',
          src: ''

Zoom Effect on Open/Close:

<a href="image_large.jpg" class="zoom-effect"><img src="image_thumb.jpg" alt="Thumbnail"></a>
    type: 'image',
    mainClass: 'mfp-with-zoom',
    zoom: {
      enabled: true,
      duration: 300,
      easing: 'ease-in-out',
      opener: function(openerElement) {
        return'img') ? openerElement : openerElement.find('img');

Magnific Popup stands as a versatile and highly efficient lightbox plugin, known for its exceptional capabilities in elevating the presentation of diverse content types on websites. When it comes to web design, this plugin takes center stage, largely due to its unwavering focus on performance, an enriched user experience, and remarkable adaptability.

Its feature set and functionality appeal to an extensive audience of web developers and designers who value its ability to seamlessly integrate into various design projects.
It’s no wonder that Magnific Popup has emerged as a top choice within the web design community, contributing to the creation of visually stunning and engaging websites.