resetting bxSlider

前端 未结 9 1568
滥情空心
滥情空心 2021-01-06 06:45

I took a different direction with a carousel I implemented, opting for bxSlider instead of jCarousel. This is for an image gallery I am building http://rjwcollective.com/equ

9条回答
  •  迷失自我
    2021-01-06 07:30

    ** Note : For the multiple bx slider reload on click of the element. *

    $(function() {

        var slider1 = $('#slider-1 .product_slider ul').bxSlider({
                pager:false,
                auto:true,
            });
    
        var slider2 = $('#slider-2 .product_slider ul').bxSlider({
            pager:false,
            auto:true,
        });
        var slider3 = $('#slider-3 .product_slider ul').bxSlider({
            pager:false,
            auto:true,
        });
        var slider4 = $('#slider-4 .product_slider ul').bxSlider({
            pager:false,
            auto:true,
        });
    
        $('.tab_container ul.nav-tabs li a').on('click',function() {
            slider1.reloadSlider();
            slider2.reloadSlider();
            slider3.reloadSlider();
            slider4.reloadSlider();
        });
    });
    

    By: Milan Pandya

提交回复
热议问题