There is a video that is played in the pop-up window of the magnificPopup script. Question: why does the pop-up window appear when I click on the link and the video is played - everything is fine, but when I press the button there is no? How to make it so that when you press a button, everything works? Here fidl
$(".play-single").magnificPopup({ type: "iframe" }); $("#inpage_scroll_btn").magnificPopup({ type: "iframe" }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="https://rawgithub.com/dimsemenov/Magnific-Popup/master/dist/jquery.magnific-popup.js"></script> <link rel="stylesheet" href="https://rawgit.com/dimsemenov/Magnific-Popup/master/dist/magnific-popup.css"> <a href="https://vimeo.com/80836225" class="play-single">Play Single</a> <br/> <br /> <button id="inpage_scroll_btn" class="btn btn-primary standard-button inpage-scroll" onclick="parent.location='https://www.youtube.com/watch?v=DLihUyElkhM'">СМОТРЕТЬ</button>