I'm working on a website and trying to add a popup video attached to an tag.
I've seen two or three possible solutions to my problem, but they didn't work the way I'd like them to. Some of the guides were made 10 years ago and are outdated too.
The last thing I tried was the "Magnific popup" method, I could insert the popup, but the video didn't load:
HTML
<a class="popup-youtube" href="https://www.youtube.com/watch?v=QwGf3ZH1ZUQ">Open YouTube video</a><br>
Javascript
$(document).ready(function() {
$('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
disableOn: 700,
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: false
});
});