我正在尝试添加左侧&正确的按钮到JSSOR slider,即使我将他们的例子复制到T(呃,所以我相信),它仍然没有用。
以下是我用于jssor滑块的选项(除了所有动画选项)。 $ ArrowNavigatorOptions是我假设我需要让箭头工作,但唉,还没有工作:
var options = {
$AutoPlay: 1,
$FillMode: 2,
$DragOrientation: 0,
$PlayOrientation: 1,
$PauseOnHover: 2,
$Idle: 4000,
$ArrowKeyNavigation: true,
$SlideshowOptions: {
$Class: $JssorSlideshowRunner$,
$Transitions: _jssorTransitions,
$TransitionsOrder: 0,
$ShowLink: true
},
$ArrowNavigatorOptions: { //[Optional] Options to specify and enable arrow navigator or not
$Class: $JssorArrowNavigator$, //[Requried] Class to create arrow navigator instance
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
$Steps: 1 //[Optional] Steps to go for each navigation request, default value is 1
}
};
var jssor_slider1 = new $JssorSlider$("slides", options);
function ScaleSlider() {
var windowWidth = $(window).width();
if (windowWidth) {
var windowHeight = $(window).height();
var originalWidth = jssor_slider1.$OriginalWidth();
var originalHeight = jssor_slider1.$OriginalHeight();
var scaleWidth = windowWidth;
if (originalWidth / windowWidth > originalHeight / windowHeight) {
scaleWidth = Math.ceil(windowHeight / originalHeight * originalWidth);
}
jssor_slider1.$ScaleWidth(scaleWidth);
}
else
window.setTimeout(ScaleSlider, 30);
}
ScaleSlider();
$(window).bind("load", ScaleSlider);
$(window).bind("resize", ScaleSlider);
$(window).bind("orientationchange", ScaleSlider);
以及我用于按钮的html:
<div class="main-container">
<div class="slideshow-container">
<div id="slides">
<div u="slides" class="slide-single">
<?php foreach($page->files()->sortBy('sort', 'asc') as $image): ?>
<div>
<img u=image src="<?php echo $image->url() ?>" alt="">
</div>
<?php endforeach ?>
</div>
</div>
</div>
<span u="arrowleft" class="jssora01l arrow"></span>
<span u="arrowright" class="jssora01r arrow"></span>
</div>
以下是应用程序中的代码:link
有什么想法吗?
非常感谢,把头发拉过这个!