提前道歉 - 这是一个非常基础的问题:为什么swipeleft和swiperight无法工作?
(function() {
$('img').on('swiperight', swipeRight);
function swipeRight(myEvent){
myEvent.stopPropagation();
alert('swipeRight');
};
$('img').on('swipeleft', swipeLeft);
function swipeLeft(myEvent) {
myEvent.stopPropagation();
alert('swipeLeft');
};
})();
我已经加载了jQuery,但我是否需要加载像jQuery Mobile或Angular这样的整个库呢?我只想从一张图片滑动到另一张。