2014-07-25 5 views
0

Je n'arrive pas à intégrer colorbox.js dans un site sur lequel je dois travailler car je n'arrive pas à le voir afficher quoi que ce soit (même si je veux qu'il affiche une vidéo). Quelqu'un peut-il regarder mon code et me dire ce que j'ai fait?Impossible de charger js colorbox

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 (Il est évident que j'ai chargé le script JQuery suivi par le script colorbox)

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

Répondre

0

erreur stupide a fait parce qu'il était une fin session de codage, je juste besoin de l'envelopper dans un onload, comme ceci:

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