在 Chrome/Safari 中,一旦灯箱关闭,Vimeo 视频将继续在后台播放。此时“分离”可以停止视频,但是当您关闭灯箱并单击菜单项以重新打开视频时,视频 div 为空白。我已尝试“克隆”和“附加”,但无法重新输入视频。
网站功能:点击“a”“b”“c”,随视频一起出现灯箱。单击灯箱中的“X”,灯箱内容关闭。
HTML/CSS
a id="alphaa" <------ The a, b, c menu item, when clicked, open the lightbox
.abcbox_content <------- The div that holds all the content for the lightbox
#videowrapper <------ div that holds the Vimeo iframe
.abc-align-right <---- the "X" to close the lightbox
这是我到目前为止的 jQuery。
<script type="text/javascript">
$(document).ready(function(){
$(".abc-align-right").click(function() {
$("#videowrapper").clone(true);
$("#videowrapper").contents().detach();
if ($(".abcbox_content").is(':visible'))
$("#videowrapper").append();
}); });
</script>
谢谢你的帮助