2014-07-25 46 views
0

我無法將colorbox.js集成到網站中,因爲我無法顯示任何內容(儘管我希望它顯示視頻)。任何人都可以看看我的代碼並告訴我我做了什麼嗎?無法獲取colorbox js加載

HTML

<div id="bl_hp_quickLinkBoxLeftThree"> 
    <a class='inline' href="#inline_content">Open Sesame!</a> 
</div><!-- #bl_hp_quickLinkBoxLeftThree --> 
<div id="bl_hp_quickLinkBoxRightThree"> 
    <p>This is some content</p> 
</div><!-- #bl_hp_quickLinkBoxRightThree --> 
<img src="./images/quicklinks/verso.png" /> 

<div style='display:none'> 
    <div id='inline_content' style='padding:10px; background:#fff;'> 
     <video controls="controls" poster="/videos/Company_video_EN_VERSION.jpg" style="width:100%" title="1280"> 
      <source src="/videos/Company_video_EN_VERSION.m4v" type="video/mp4" /><source src="/videos/Company_video_EN_VERSION.webm" type="video/webm" /> 
      <source src="/videos/Company_video_EN_VERSION.ogv" type="video/ogg" /><source src="/videos/Company_video_EN_VERSION.mp4" /> 
      <object type="application/x-shockwave-flash" data="/videos/flashfox.swf" width="1280" height="720" style="position:relative;"> 
       <param name="movie" value="/videos/flashfox.swf" /><param name="allowFullScreen" value="true" /> 
       <param name="flashVars" value="autoplay=true&amp;controls=true&amp;fullScreenEnabled=true&amp;posterOnEnd=true&amp;loop=false&amp;poster=/videos/Company_video_EN_VERSION.jpg&amp;src=Company_video_EN_VERSION.m4v" /> 
       <embed src="/videos/flashfox.swf" width="1280" height="720" style="position:relative;" flashVars="controls=true&amp;fullScreenEnabled=true&amp;posterOnEnd=true&amp;loop=false&amp;poster=/videos/Company_video_EN_VERSION.jpg&amp;src=Company_video_EN_VERSION.m4v" allowFullScreen="true" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer_en" /> 
       <img alt="Company video EN VERSION" src="/videos/Company_video_EN_VERSION.jpg" style="position:absolute;left:0;" width="100%" title="Video playback is not supported by your browser" /> 
      </object> 
     </video> 
    </div> 
</div> 

的Javascript(很明顯,我已經加載了jQuery腳本其次是顏色框腳本)

$(".inline").colorbox({inline:true, width:"50%"}); 

回答

0

愚蠢的錯誤作出,因爲這是一個遲到的編碼會話,我只需要將其包裝在下載中,如下所示:

$(document).ready(function(){ 
    $(".inline").colorbox({inline:true, width:"50%"}); 
});