を使用してスワイプ機能を含めたいのですtouchSwipe.js
が、エラーが発生しています。
エラー:
**Uncaught TypeError: Cannot call method 'handle' of undefined**
私はdivを持っています:#myImageFlow
これを HTML に追加しました:
$.getScript('js/touchSwipe.js');
そしてjsファイルのこの関数:
$("#myImageFlow").swipe({
swipe:function(event, direction, distance, duration, fingerCount) {
if(direction == 'left') {
my.MouseWheel.handle(-1);
} else if (direction == 'right') {
my.MouseWheel.handle(1);
}
}
});