0

几天来,我一直在研究并试图解决这个问题。

我正在使用带有嵌套级别和 JCarouselLite 的 Bullet List Accordian Menu。

冲突似乎与 JQuery.easing 相关:
* ddaccordian 适用于 jquery.easing.1.3.js - 但不适用于 1.1
* jcarousellite 适用于 jquery.easing.1.1.js - 但不适用于 1.3

我也尝试过使用:
* var $j = jQuery.noConflict()- 无济于事。
* jquery.easing.compatibility.js(在这里找到:http: //gsgd.co.uk/sandbox/jquery/easing/)也没有工作。

以下是我的标头代码:

<link href="style/main5.css" rel="stylesheet" type="text/css" />
<link href="style/bullet5.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jCarouselLite.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js/ddaccordion.js">
/***********************************************
* Accordion Content script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/
</script>
<script type="text/javascript"> 
    $(document).ready(function() {
          $(function() {
          $(".carousel").jCarouselLite({
            auto: 15000,
            speed: 3000,
            vertical: false,
            circular: true,
            visible: 9,
            scroll: 9,
            btnNext: ".next",
            btnPrev: ".prev",
            easing: "easeout",
              });
              });
            });

    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }
</script> 


<script type="text/javascript">
        ddaccordion.init({ //top level headers initialization
            headerclass: "expandable", //Shared CSS class name of headers group that are expandable
            contentclass: "categoryitems", //Shared CSS class name of contents group
            revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
            mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
            collapseprev: false, //Collapse previous content (so only one open at any time)? true/false 
            defaultexpanded: [], //index of content(s) open by default [index1, index2, etc]. [] denotes no content
            onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
            animatedefault: false, //Should contents open by default be animated into view?
            persiststate: true, //persist state of opened contents within browser session?
            toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
            togglehtml: ["suffix", "<img src='images/bulletlist/btnPlus.png' class='statusicon' />", "<img src='images/bulletlist/btnMinus.png' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
            animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
},
            onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
                    if (isuseractivated && index!=1)  //if user clicks on any top level header that's not the 2nd one (1==2nd)
        ddaccordion.collapseone("subexpandable", 0) 
        //expand sub menu with class="subexpandable", specifically, the first header within it
            // to close the sub menu, use collapseone like this -->    ddaccordion.collapseone("subexpandable", 0) 
            // to open the sub menu, use expandone like this -->    ddaccordion.expandone("subexpandable", 0) 
                //do nothing
            }
        })

        ddaccordion.init({ //2nd level headers initialization
            headerclass: "subexpandable", //Shared CSS class name of sub headers group that are expandable
            contentclass: "subcategoryitems", //Shared CSS class name of sub contents group
            revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover
            mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
            collapseprev: false, //Collapse previous content (so only one open at any time)? true/false 
            defaultexpanded: [], //index of content(s) open by default [index1, index2, etc]. [] denotes no content
            onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
            animatedefault: false, //Should contents open by default be animated into view?
            persiststate: true, //persist state of opened contents within browser session?
            toggleclass: ["opensubheader", "closedsubheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
            togglehtml: ["suffix", "<img src='images/bulletlist/arrowbullet.png' class='statusicon' />", "<img src='images/bulletlist/arrowbullet_up.png' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
            animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
            oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
                //do nothing
            },
            onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
            }
        })
</script>


<script type="text/javascript">  // Checkbox Input function
    $(document).ready(function(){
        $(".wrapper").change(function(){
            if($(this).is(":checked")){
                $(this).next("label").addClass("tick");
            }else{
                $(this).next("label").removeClass("tick");
            }
        });
    });
</script>  
4

1 回答 1

0

您可以尝试更新您的 jCarouselLite 版本。我正在成功地使用http://code.jquery.com/jquery-1.8.2.min.jsand jcarousellite-1.0.1.jswith jquery.easing.1.3.js,with with jquery.mousewheel.min

于 2012-12-18T18:41:17.773 回答