Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/multithreading/4.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_Jquery Delegate - Fatal编程技术网

jQuery委托和自定义事件

jQuery委托和自定义事件,jquery,jquery-delegate,Jquery,Jquery Delegate,将自定义事件绑定到委托控件时出现问题 任何一天我都会像这样使用插件 $(".galleryImage").swipe({ swipeLeft: function (event, direction, distance, duration, fingerCount) { self.changeImageRight('swipe'); }, swipeRight: function (event, direction, distance, duration,

将自定义事件绑定到委托控件时出现问题

任何一天我都会像这样使用插件

$(".galleryImage").swipe({
    swipeLeft: function (event, direction, distance, duration, fingerCount) {
        self.changeImageRight('swipe');
    },
    swipeRight: function (event, direction, distance, duration, fingerCount) {
        self.changeImageLeft('swipe');
    },
    threshold: 75 // px before events are triggered
});
如果我像这样把它绑起来,它会工作的

$($galleryImageContainer).delegate('.galleryImage', 'click', function () {
    // ... magic stuff
});
但如果我用刷卡,它不会

$($galleryImageContainer).delegate('.galleryImage', 'swipe', function () {
    // ... magic stuff
});
有没有办法绑定到这样的自定义事件


Thans

您的定制活动是否有气泡?一层薄的、通常为球形或半球形的液体膜,充满空气或气体,有时也用肥皂制成?没有其他活动与这些活动相关