Javascript Fancybox视频库
我正在尝试使用我为图像库找到的一些教程,用fancybox制作一个视频库,但我不确定这是否是我想要的。我所拥有的只是一个图标,它显示一个fancybox,其中包含我想要将视频容器转换为视频库的所有iFrame 这是我的HTML:Javascript Fancybox视频库,javascript,jquery,html,iframe,fancybox,Javascript,Jquery,Html,Iframe,Fancybox,我正在尝试使用我为图像库找到的一些教程,用fancybox制作一个视频库,但我不确定这是否是我想要的。我所拥有的只是一个图标,它显示一个fancybox,其中包含我想要将视频容器转换为视频库的所有iFrame 这是我的HTML: <a id="videoIcon" href="#video" class="fancybox"> <img src="http://megaicons.net/static/img/icons_sizes/8/178/512/photo-vi
<a id="videoIcon" href="#video" class="fancybox">
<img src="http://megaicons.net/static/img/icons_sizes/8/178/512/photo-video-start-icon.png" width="33" height="33">
</a>
<div id="video" style="display: none;" data-fancybox-group="gallery">
<iframe class="fancybox_iframe" src="http://www.dailymotion.com/embed/video/x2plsuh" width="480" height="269" frameborder="0" allowfullscreen=""></iframe>
<iframe class="fancybox_iframe" src="http://www.dailymotion.com/embed/video/x2pn6zo" width="480" height="269" frameborder="0" allowfullscreen=""></iframe>
<iframe class="fancybox_iframe" src="http://www.dailymotion.com/embed/video/x2pn66h" width="480" height="269" frameborder="0" allowfullscreen=""></iframe>
<iframe class="fancybox_iframe" src="http://www.dailymotion.com/embed/video/x2pjpvg" width="480" height="269" frameborder="0" allowfullscreen=""></iframe>
<iframe class="fancybox_iframe" src="http://www.dailymotion.com/embed/video/x2pn6wd" width="480" height="269" frameborder="0" allowfullscreen=""></iframe>
<iframe class="fancybox_iframe" src="http://www.dailymotion.com/embed/video/x2pn61r" width="480" height="269" frameborder="0" allowfullscreen=""></iframe>
<iframe class="fancybox_iframe" src="http://www.dailymotion.com/embed/video/x2p5add" width="480" height="269" frameborder="0" allowfullscreen=""></iframe>
<iframe class="fancybox_iframe" src="http://www.dailymotion.com/embed/video/x2or2yc" width="480" height="269" frameborder="0" allowfullscreen=""></iframe>
<iframe class="fancybox_iframe" src="http://www.dailymotion.com/embed/video/x2of336" width="480" height="269" frameborder="0" allowfullscreen=""></iframe>
</div>
这里有一个
谢谢你,很抱歉我的英语不好
另外:iFrame是通过ajax调用获得的,并将响应放在带有handlebar.js的模板中,因此包含所有视频的div在开始时实际上是空的。然而,我认为这与解决方案无关
$(document).ready(function() {
$("a#videoIcon").fancybox();
$(".fancybox_iframe").fancybox({
type : 'iframe'
});
});