0
剛剛實現Fancybox彈出頁面加載 - 但是,當用戶點擊fancybox返回到網站,歌曲將開始再次播放。任何想法可能會導致這種情況?Fancybox視頻在關閉時繼續播放
<!-- FANCYBOX POPUP -->
<a class="popupLink" href="#popup"></a>
<div id="popup">
<iframe width="853" height="480" src="http://www.youtube.com/embed/Qw7k_erTgow?autoplay=1" frameborder="0" allowfullscreen></iframe>
</div>
<!-- .popup -->
<script type="text/javascript">
$(document).ready(function() {
$(".popupLink").fancybox();
window.setTimeout('$(".popupLink").trigger("click")', 100);
});
</script>
<script type="text/javascript">
$("a.more").click(function() {
$.fancybox({
'padding' : 0,
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'title' : this.title,
'width' : 680,
'height' : 495,
'href' : this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
'type' : 'swf',
'swf' : {
'wmode' : 'transparent',
'allowfullscreen' : 'true'
}
});
謝謝JFK,感謝您的幫助! –