JQuery缓解与JCarouselLite和

时间:2012-06-15 14:52:15

标签: jquery jquery-plugins accordion jcarousellite

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

我正在使用具有嵌套级别和JCarouselLite的Bullet List Accordian菜单。

冲突似乎与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>  

1 个答案:

答案 0 :(得分:0)

您可以尝试更新您的jCarouselLite版本。我已成功将http://code.jquery.com/jquery-1.8.2.min.jsjcarousellite-1.0.1.jsjquery.easing.1.3.js以及jquery.mousewheel.min一起使用。