CarouFredSel Plugin using TouchSwipe with links not working

后端 未结 6 1097
梦谈多话
梦谈多话 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:22

    The carouFredSel with < a > doesn't work for me well with swipe 'inside'. You can use excludedElements, but on Ipad you'll have to hold your finger to use < a > (longTap). That's not good for users. If you try to use carouFredSel({ swipe:( option { tap: function ... it won't work (at least in my case).

    My solution is to use swipe (touchSwipe) separately:

    $(".carusel").swipe({
      excludedElements: "button, input, select, textarea, .noSwipe",
      swipeLeft: function() {
        $('.carusel').trigger('next', 4);
      },
      swipeRight: function() {
        $('.carusel').trigger('prev', 4);
      },
      tap: function(event, target) {
        window.open($(target).closest('.carusel-cnt').find('carusel-cnt-link').attr('href'), '_self');
      }
    });
    

提交回复
热议问题