CarouFredSel Plugin using TouchSwipe with links not working

后端 未结 6 1088
梦谈多话
梦谈多话 2021-02-01 23:53

I\'m using the awesome CarouFredSel JQuery carousel plugin which includes features for integrating the JQuery TouchSwipe library for handheld devices as well.

The caro

6条回答
  •  鱼传尺愫
    2021-02-02 00:05

    Caroufredsel is already integrated and compatible with touchswipe.

    1. Add tochswipe js library
    2. Add the touch events in the caroufresel configuration

    JAVASCRIPT RESULT

     $(document).ready(function () {
         $('#foo2').carouFredSel({
             auto: false,
             responsive: false,
             items: {
                 visible: 3,
                 width: 100
             },
             width: 600,
             prev: '#prev2',
             next: '#next2',
             pagination: "#pager2",
             swipe: {
                 onMouse: true,
                 onTouch: true
             }
         });
     });
    

    Here is a working demo

提交回复
热议问题