Lightslider和mootols不能一起工作,

时间:2017-01-30 18:35:28

标签: javascript jquery html css

Lightslider Jquery Code和mootols如果我删除jquery api代码不能一起工作,所以mootools工作否则如果我把jquery api代码然后lightslider工作(它使用jquery)但mootools然后不工作。

Mootools的

<script language="javascript" type="text/javascript" src="/script/mootools-1.2.1-core.js"></script>
 <script language="javascript" type="text/javascript" src="/script/mootools-1.2-more.js"></script> 
<script language="javascript" type="text/javascript" src="/script/slideitmoo-1.1.js"></script>

<script language="javascript" type="text/javascript">
  window.addEvents({
    'domready': function(){
      /* thumbnails example , div containers */
      new SlideItMoo({
            overallContainer: 'SlideItMoo_outer',
            elementScrolled: 'SlideItMoo_inner',
            thumbsContainer: 'SlideItMoo_items',    
            itemsVisible: 5,
            elemsSlide: 2,
            duration: 150,
            itemsSelector: '.SlideItMoo_element',
            itemWidth: 158,
            showControls:1});
    },

  });
</script>

Lightslider

<link rel="stylesheet" type="text/css" href="/stylesheet/lightslider.css" />
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'></script>
    <script src="/script/lightslider.js"></script> 
    <script>
         $(document).ready(function() {
            jQuery("#content-slider").lightSlider({
                loop:true,
                 auto: true,
                keyPress:true
            });
        });
    </script>

1 个答案:

答案 0 :(得分:0)

我得到了我的解决方案,我正在尝试自己然后它正在工作。

只需要更改两个东西,一个api链接位置2nd $将是jQuery

喜欢这个

<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'></script>

<script language="javascript" type="text/javascript" src="/script/mootools-1.2.1-core.js"></script>
<script language="javascript" type="text/javascript" src="/script/mootools-1.2-more.js"></script>
<script language="javascript" type="text/javascript" src="/script/slideitmoo-1.1.js"></script>

<script language="javascript" type="text/javascript">
  window.addEvents({
    'domready': function(){
      /* thumbnails example , div containers */
      new SlideItMoo({
            overallContainer: 'SlideItMoo_outer',
            elementScrolled: 'SlideItMoo_inner',
            thumbsContainer: 'SlideItMoo_items',    
            itemsVisible: 5,
            elemsSlide: 2,
            duration: 150,
            itemsSelector: '.SlideItMoo_element',
            itemWidth: 158,
            showControls:1});
    },

  });
</script>

<link rel="stylesheet" type="text/css" href="/stylesheet/lightslider.css" />
    <script src="/script/lightslider.js"></script> 
    <script>
         jQuery(document).ready(function() {
            jQuery("#content-slider").lightSlider({
                loop:true,
                 auto: true,
                keyPress:true
            });
        });
    </script>