Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 轻触式轻触功能_Jquery_Swipe - Fatal编程技术网

Jquery 轻触式轻触功能

Jquery 轻触式轻触功能,jquery,swipe,Jquery,Swipe,我有以下代码,当用户滑动.carousel时执行函数。但是我不太确定如何使用tap函数,我想在用户点击.carousel元素中的链接时执行一个函数。我该怎么写呢?谢谢 $(".carousel").swipe({ excludedElements: "button, input, select, textarea, .noSwipe", swipeLeft: function() { $('.carousel').trigger('next', 4);

我有以下代码,当用户滑动.carousel时执行函数。但是我不太确定如何使用tap函数,我想在用户点击.carousel元素中的链接时执行一个函数。我该怎么写呢?谢谢

 $(".carousel").swipe({
      excludedElements: "button, input, select, textarea, .noSwipe",
      swipeLeft: function() {
        $('.carousel').trigger('next', 4);
      },
      swipeRight: function() {
        $('.carousel').trigger('prev', 4);
      },
      tap: function(event, target) {
       ...............
      }
    });