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>