无法设置jssor滑块的高度

时间:2015-04-03 10:27:46

标签: javascript jquery ajax jssor

我用来绘制滑块的jsp代码是......

<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="<%=request.getContextPath()%>/images/sliderimages/banner01.png" /></div>
                <div><img u="image" src="<%=request.getContextPath()%>/images/sliderimages/banner02.jpg" /></div>
                <div><img u="image" src="<%=request.getContextPath()%>/images/sliderimages/banner03.jpg" /></div>
                <div><img u="image" src="<%=request.getContextPath()%>/images/sliderimages/banner04.png" /></div>
                <div><img u="image" src="<%=request.getContextPath()%>/images/sliderimages/banner05.jpg" /></div>
                <div><img u="image" src="<%=request.getContextPath()%>/images/sliderimages/banner06.jpg" /></div>
                <div><img u="image" src="<%=request.getContextPath()%>/images/sliderimages/banner07.jpg" /></div>
            </div>
        </div>

我用来显示滑块的jquery函数是

 function ScaleSlider() {
    var parentWidth = $('#slider1_container').parent().width();
    console.log("**********"+parentWidth);
    if (parentWidth) {
        jssor_slider1.$ScaleWidth(parentWidth);
    }

    else
        $JssorUtils$.$Delay(ScaleSlider, 30);
}

ScaleSlider();
$(window).bind("load", ScaleSlider);
$(window).bind("resize", ScaleSlider);
$(window).bind("orientationchange", ScaleSlider);

我无法增加滑块的高度请帮助....

1 个答案:

答案 0 :(得分:2)

您可以更改jssor滑块的宽度和高度。

找到这些代码:

$SlideWidth: 600,
$SlideHeight: 300,