2013-03-28 31 views
0

我想知道如果任何人有任何想法或可以帮助我一个轻微的问题。 (头部代码如下)灯箱/ jquery moleskine笔记本,JavaScript互相干扰

我正在使用Moleskine笔记本Jquery(网站笔记本),我正在为这里的日本公司制作漫画类漫画。他们希望页面成为图像(这是可以的),但他们希望用一种lightbox风格(弹出式画廊类型风格)单击图像的某些部分。

当我合并两个代码时,JavaScript必须互相干扰,它不起作用。也许是因为图像在moleskine笔记本的div里面?当我单击链接到lightbox div的图像时,它不打开灯箱,它只是在新页面中打开图像。

我也尝试在代码中以不同的方式放置代码。灯箱底部和脚本向上。很多不同的方式,总是互相干扰。

有没有人有任何想法如何使这项工作?

干杯 杰斯

<script> 
    jQuery.noConflict(); 
     $(document).ready(function(){ 
      $(".group1").colorbox({rel:'group1'}); 
      $(".group2").colorbox({rel:'group2', transition:"fade"}); 
      $(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"}); 
      $(".group4").colorbox({rel:'group4', slideshow:true}); 
      $(".ajax").colorbox(); 
      $(".youtube").colorbox({iframe:true, innerWidth:425, innerHeight:344}); 
      $(".vimeo").colorbox({iframe:true, innerWidth:500, innerHeight:409}); 
      $(".iframe").colorbox({iframe:true, width:"80%", height:"80%"}); 
      $(".inline").colorbox({inline:true, width:"50%"}); 
      $(".callbacks").colorbox({ 
       onOpen:function(){ alert('onOpen: colorbox is about to open'); }, 
       onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); }, 
       onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); }, 
       onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); }, 
       onClosed:function(){ alert('onClosed: colorbox has completely closed'); } 
      }); 

      $('.non-retina').colorbox({rel:'group5', transition:'none'}) 
      $('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true}); 

      //Example of preserving a JavaScript event for inline calls. 
      $("#click").click(function(){ 
       $('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here."); 
       return false; 
      }); 
     }); 
    </script> 


    <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.4.min.js"></script> 
    <script src="booklet/jquery.easing.1.3.js" type="text/javascript"></script> 
    <script src="booklet/jquery.booklet.1.1.0.min.js" type="text/javascript"></script> 

    <link href="booklet/jquery.booklet.1.1.0.css" type="text/css" rel="stylesheet" media="screen" /> 
    <link rel="stylesheet" href="css/style.css" type="text/css" media="screen"/> 
    <link rel="stylesheet" href="colorbox.css" /> 

    <script src="cufon/cufon-yui.js" type="text/javascript"></script> 
    <script src="cufon/ChunkFive_400.font.js" type="text/javascript"></script> 
    <script src="cufon/Note_this_400.font.js" type="text/javascript"></script> 
    <script type="text/javascript"> 
     Cufon.replace('h1,p,.b-counter'); 
     Cufon.replace('.book_wrapper a', {hover:true}); 
     Cufon.replace('.title', {textShadow: '1px 1px #C59471', fontFamily:'ChunkFive'}); 
     Cufon.replace('.reference a', {textShadow: '1px 1px #C59471', fontFamily:'ChunkFive'}); 
     Cufon.replace('.loading', {textShadow: '1px 1px #000', fontFamily:'ChunkFive'}); 
    </script> 

回答

0

您还没有包含在你页面的colorbox.js文件,您的呼叫前颜色框jQuery是装连。它不会只用colorbox css。另外,为什么这样一个旧版本的jQuery?当前版本是1.9.10