我做了我几乎有些功能在我的应用程序。我上完成动画tabhold和vmouseup上取下mouse.But我只需要一个图像在离开一个时移,右,而使用swipeleft或刷卡只在右right.But我的图像旋转不在左侧。你能告诉我如何旋转图像吗?链接查找:http : //jsfiddle.net/PMrDn/101/
$(document).off('swipeleft').on('swipeleft', '#index', function(event){
timerObject.interval_id = setInterval(animate, 20);
});
$(document).off('swiperight').on('swiperight', '#index', function(event){
timerObject.interval_id = setInterval(animate, 20);
});
两种情况都在调用animate(),但是animate()仅向右旋转(boxes[idx].currentAngle--;
)。您可以将角度差传递给animate()而不是始终减去1。例如:http : //jsfiddle.net/PMrDn/102/
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句