2012-06-15 26 views
0

我一直在研究,並試圖解決這個問題的好幾天。JQuery緩解與JCarouselLite衝突和

我正在使用帶有嵌套級別和JCarouselLite的項目符號列表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> 

回答

0

您可以嘗試更新jCarouselLite的版本。我成功使用http://code.jquery.com/jquery-1.8.2.min.jsjcarousellite-1.0.1.jsjquery.easing.1.3.js,以及jquery.mousewheel.min