2012-07-29 67 views
1

點擊圖片左側邊欄http://vaiman.org/我們有太小 YouTube盒子。我需要增加YouTube區域。怎麼樣?YouTube在FancyBox太小

這裏是我的JavaScript代碼(http://vaiman.org/wp-content/themes/vaiman/javascript/youtube.js):

jQuery(document).ready(function() { 
    jQuery(".various").fancybox({ 
     maxWidth : 1000/*850*/, 
     maxHeight : 1000/*638*/, 
     minWidth : 1000/*850*/, 
     minHeight : 1000/*638*/, 
     fitToView : false, 
     width  : 1000/*'100%'*/ /*70%*/, 
     height  : 1000/*'100%'*/ /*70%*/, 
     autoSize : false, 
     closeClick : false, 
     openEffect : 'none', 
     closeEffect : 'none' 
    }); 
});

什麼是我的錯誤?

+0

看到一個例子似乎是爲我工作。我點擊你的縮略圖,它會打開fancybox看起來是一個默認大小的YouTube播放器 – Anagio 2012-07-29 10:38:32

+0

它是你需要放大的花式框的容器嗎? – Anagio 2012-07-29 10:40:13

回答

2

此代碼下面你可以在jsfiddle here

<div id="single_1"><a href="http://www.youtube.com/embed/A3Atj57r15U?autoplay=1" class="various fancybox.iframe"> 
<img src="http://vaiman.org/wp-content/themes/vaiman/images/photo1.jpg" width="191" height="91" alt=""></a></div>​ 

$(document).ready(function() { 
    $(".various").fancybox({ 
     maxWidth: 800, 
     maxHeight: 600, 
     fitToView: false, 
     width: '70%', 
     height: '70%', 
     autoSize: false, 
     closeClick: false, 
     openEffect: 'none', 
     closeEffect: 'none' 
    }); 
});​