Javascript 旋转木马-指定按设备宽度可见的幻灯片

Javascript 旋转木马-指定按设备宽度可见的幻灯片,javascript,jcarousellite,Javascript,Jcarousellite,恐怕我对javascript不是很在行,我真的很希望有人能帮我 使用jcarousellite,此代码位于正文的顶部: <script type="text/javascript"> $(function() { $(".carousellite").jCarouselLite({ btnNext: ".next", btnPrev: ".prev", auto: 1200, speed: 3000, easing: "easeInOutExp

恐怕我对javascript不是很在行,我真的很希望有人能帮我

使用jcarousellite,此代码位于正文的顶部:

<script type="text/javascript">
$(function() {
$(".carousellite").jCarouselLite({
    btnNext: ".next",
    btnPrev: ".prev",
    auto: 1200,
    speed: 3000,
    easing: "easeInOutExpo",
    visible: 5,
    pauseOnMouseOver: true, // This is the configuration parameter
    circular: true
});    
});
</script>

$(函数(){
$(“.carousellite”).jCarouselLite({
btnNext:“.next”,
btnPrev:“.prev”,
汽车:1200,
速度:3000,
轻松:“易出世博会”,
可见:5,
pauseOnMouseOver:true,//这是配置参数
通告:是的
});    
});

如果设备宽度我找到了自己的解决方案,我希望可见数字的值为1

    <script>
    setTimeout(function(){
        if (screen.width < 480 ){
            //scripts for smaller screens
            $(".carousellite").jCarouselLite({
    visible: 1
    });
        }
    },300)
</script>

setTimeout(函数(){
如果(屏幕宽度<480){
//小屏幕脚本
$(“.carousellite”).jCarouselLite({
可见:1
});
}
},300)
感谢:

    <script>
    setTimeout(function(){
        if (screen.width < 480 ){
            //scripts for smaller screens
            $(".carousellite").jCarouselLite({
    visible: 1
    });
        }
    },300)
</script>