Liju Liju - 1 month ago 21
jQuery Question

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?

Answer

Check the following link for documentation:

Doc

$(document).ready(function() {
    $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
        disableOn: 700,
        type: 'iframe',
        mainClass: 'mfp-fade',
        removalDelay: 160,
        preloader: false,

        fixedContentPos: false
    });
});

<a class="popup-youtube" href="http://www.youtube.com/watch?v=0O2aH4XLbto">Open YouTube video</a>

Hope this helps.

Comments