0

我想知道是否有人有任何想法或可以帮助我解决一个小问题。(头部代码如下)

我正在使用 Moleskine Notebook Jquery(网站笔记本),我正在为一家日本公司制作漫画类型的漫画。他们希望页面是图像(这没关系),但他们希望单击具有灯箱样式(弹出式画廊类型样式)的图像部分。

当我合并这两个代码时,javascript必须相互干扰,它不起作用。也许是因为图像在moleskine笔记本的div中?当我单击链接到灯箱 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>
4

1 回答 1

0

在加载 jQuery 之前,您还没有在页面和调用颜色框中包含 colorbox.js 文件。它不适用于仅使用颜色框 css。另外,为什么会有这么旧的 jQuery 版本?当前版本是 1.9.10

于 2013-05-31T06:08:48.480 回答