Open raymondZhong opened 9 years ago
更新1.0.6版,写成下面这样:
var boxer = new TouchBox('#touchBoxCt', {
loop: true,
animation: 'slide'
});
boxer.on('touchmove', function(activeIndex, offsetY) {
console.log('touchmove, ', 'current index:', activeIndex, ' offsetY:', offsetY);
return offsetY > 0;
});
boxer.on('touchend', function(activeIndex, offsetY) {
console.log('touchend, ', 'current index:', activeIndex, ' offsetY:', offsetY);
return offsetY > 0;
});
怎么设置 touchbox 只能向上推, 不要往下拉!