Video Youtube视频在Mangific弹出窗口上的加载时间似乎为1秒,但它会自动跳转到Youtube视频页面
我用标准代码实现了放大弹出:Video Youtube视频在Mangific弹出窗口上的加载时间似乎为1秒,但它会自动跳转到Youtube视频页面,video,youtube,magnific-popup,Video,Youtube,Magnific Popup,我用标准代码实现了放大弹出: <script type="text/javascript"> $(document).ready(function() { $('.popup-youtube').magnificPopup({ disableOn: 700, type: 'iframe', mainClass: 'mfp-fade', removalDelay: 160, preloader: false,
<script type="text/javascript">
$(document).ready(function() {
$('.popup-youtube').magnificPopup({
disableOn: 700,
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: false
});
});
</script>
$(文档).ready(函数(){
$('.popup youtube').magnificPopup({
禁用日期:700,
键入:“iframe”,
mainClass:“mfp淡入”,
删除延迟:160,
预加载程序:false,
fixedContentPos:false
});
});
这似乎很管用,但
弹出窗口打开OK并在1秒内显示视频(只有有时才能看到),而不是在弹出窗口内开始播放,页面将重新加载到Youtube视频页面:(
您可以在以下位置看到实现:
知道吗,德米特里?我做了很多搜索,但没有人遇到过这个问题
提前感谢!您可以尝试添加
event.preventDefault();
$(文档).ready(函数(事件){
event.preventDefault();
$('.popup youtube').magnificPopup({
禁用日期:700,
键入:“iframe”,
mainClass:“mfp淡入”,
删除延迟:160,
预加载程序:false,
fixedContentPos:false
});
});
<script type="text/javascript">
$(document).ready(function(event) {
event.preventDefault();
$('.popup-youtube').magnificPopup({
disableOn: 700,
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: false
});
});
</script>