2012-08-06 22 views
1

我使用Colorbox的'rel function'在1張燈箱中顯示本地圖像和youTube視頻的混合,這是我設法實現的一個點。問題是我需要插入多個視頻,但是當我這樣做時,我無法獲得超過一個的顯示「請求不成功:錯誤」的colorbox加載。我已經設置視頻顯示在具有設置寬度和高度的iframe中,並且不能理解爲什麼1可以工作但不超過1.(如果我切換顯示的順序,首先顯示的順序總是顯示但不顯示其他順序,所以我知道源視頻都OKcolorbox中的多個視頻?第一次加載但其他人失敗

這裏是我的代碼:

<script> 
    jQuery(document).ready(function() { 
     jQuery('a.gallery1').colorbox({ rel:'group1' }); 
     jQuery('a.gallery2').colorbox({ rel:'group2' }); 
     jQuery('a.gallery3').colorbox({ rel:'group3' }); 
     jQuery('a.gallery4').colorbox({ rel:'group4' }); 
     jQuery('a.gallery5').colorbox({ rel:'group5' }); 
     jQuery('a.gallery6').colorbox({ rel:'group6' }); 
     jQuery('a.gallery7').colorbox({ rel:'group7' }); 
     jQuery('a.gallery8').colorbox({ rel:'group8' }); 
     jQuery('a.gallery9').colorbox({ rel:'group9' }); 
     jQuery('a.gallery10').colorbox({ rel:'group10' }); 
     jQuery('#video').colorbox({iframe:true, innerWidth:493, innerHeight:370}); 

    }); 
</script> 

<a class="gallery1" href="images/content/cosmos1Full.jpg" title="Salvatore Arancio, title of work, year"> 
        <img src="images/content/cosmos1.jpg" alt="cosmos1" width="484" height="370" /> 
        <a class="gallery1" href="images/content/ohoopee2.jpg" title="Salvatore Arancio, title of work, year"> 
        <a class="gallery1" href="images/content/ohoopee3.jpg" title="Salvatore Arancio, title of work, year"> 
        <a class='gallery1' href="http://vimeo.com/moogaloop.swf?clip_id=29956704&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00ADEF&fullscreen=1&" title="Ed Atkins, 'Death Mask 3', 2011. Extract." id="video"> 
        <a class='gallery1' href="http://www.youtube.com/v/rhCssm8BMNM?version=3" title="A Tumour (Ed Atkins)" id="video"></a> 

回答

0

我的猜測是,你正在重用的視頻ID,即使IDS需要是由HTML規範獨一無二的改變過來。如果你打算將它應用到多個元素上,那麼你可以將它應用到一個類中,

+0

謝謝傑克,這已經完成了。 – ErbertCoote 2012-08-07 21:29:43

相關問題