2014-10-17 122 views
0

不知道我是否做错了什么。我平时添加了JS脚本代码,将这两个.js文件添加到目录中。将HTML添加到指定的位置。这两个图像同时显示在下面,所以我知道HTML是好的。输入代码时出错,或者是安装时出现错误或问题。有没有什么需要修改如何安装JSSOR滑块?

**HTML:** 

<+div id="slider1_container" style="position: relative; top: 0px; left: 0px; width: 600px; height: 300px;"> 
    <!-- Slides Container --> 
    <div u="slides" style="cursor: move; position: absolute; overflow: hidden; left: 0px; top: 0px; width: 600px; height: 300px;"> 
     <div><img u="image" src="image1.jpg" /></div> 
     <div><img u="image" src="image2.jpg" /></div> 
    </div> 
</div> 

**JS:** 

<!-- it works the same with all jquery version from 1.x to 2.x --> 
<script src="/jquery/jquery.min.js"></script> 
<script src="/jquery/jssor.slider.mini.js"></script> 
<script> 
    jQuery(document).ready(function ($) { 
     //Define an array of slideshow transition code 
     var _SlideshowTransitions = [ 
     {$Duration: 900, $Clip: 1}, 
     {$Duration: 900, $Clip: 2} 
     ]; 
     var options = { 
      $AutoPlay: true, 
      $SlideshowOptions: { 
        $Class: $JssorSlideshowRunner$, 
        $Transitions: _SlideshowTransitions, 
        $TransitionsOrder: 1, 
        $ShowLink: true 
       } 
     }; 
     var jssor_slider1 = new $JssorSlider$('slider1_container', options); 
    }); 
</script> 

回答

0

您需要用jssor.slider.min.js或jssor.slider.mini.js。

请从您的页面中删除以下代码。

<script src="/jquery/jquery.min.js"></script>