更改平板电脑和移动设备的可见幻灯片数量

时间:2019-01-07 12:35:52

标签: slider bxslider

我正在使用bxslider,并且我希望在平板电脑和移动设备上(768像素及以下)仅显示一张幻灯片,但是在768像素以上时,我希望显示6张以上的幻灯片。有人可以帮我吗?

Sub TABLEGRADESCELLREF()

Dim rownumber As Long


With ActiveSheet

For rownumber = 61 To 66
    Select Case .Cells(rownumber, 2).Value
        Case .Cells(rownumber, 2).Value < 50
            .Cells(rownumber, 3).Value = "Fail"
        Case 50 To 59
            .Cells(rownumber, 3).Value = "D"
        Case 60 To 69
            .Cells(rownumber, 3).Value = "C"
        Case 70 To 89
            .Cells(rownumber, 3).Value = "B"
        Case .Cells(rownumber, 2).Value >= 90
            .Cells(rownumber, 3).Value = "A"
    End Select
Next

End With

End Sub

如果有人可以帮助,那就太好了。

1 个答案:

答案 0 :(得分:0)

You can try to remove the first bxSlider() instance, you call it only inside of the conditions:

<script>
$(document).ready(function(){

    $(function(){
        if( $(window).width() < 768) {
            $('.bxslider').bxSlider({
                captions: true,
                speed: 900,
                pause: 7000,
                startSlide: 0,
                infiniteLoop: true,
                auto: true,
                video: true,
                touchEnabled: false,
                pager: false,
                maxSlides: 1
            }); 
        } else {
            $('.bxslider').bxSlider({
                captions: true,
                speed: 900,
                pause: 7000,
                startSlide: 0,
                infiniteLoop: true,
                auto: true,
                video: true,
                touchEnabled: false,
                pager: false,
                maxSlides: 4
            });
        }
    });

});
</script>