Created
September 17, 2020 16:27
-
-
Save lucianobragaweb/956d3772035aa24ae5b5d7bae8519646 to your computer and use it in GitHub Desktop.
Configuração Magnific Popup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$(window).load(function () { | |
// retrieved this line of code from http://dimsemenov.com/plugins/magnific-popup/documentation.html#api | |
$.magnificPopup.open({ | |
items: { | |
src: 'https://www.youtube.com/watch?v=7eo8XpT4CmM' | |
}, | |
type: 'iframe', | |
iframe: { | |
markup: '<div class="mfp-iframe-scaler">'+ | |
'<div class="mfp-close"></div>'+ | |
'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+ | |
'</div>', | |
patterns: { | |
youtube: { | |
index: 'youtube.com/', | |
id: 'v=', | |
src: '//www.youtube.com/embed/%id%?autoplay=1' | |
} | |
}, | |
srcAction: 'iframe_src', | |
} | |
}); | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment