我正在为 IPAD 制作一本翻书。我的刷卡代码完美运行:
$(document).bind("zoom.swipeleft", function (e) {
$("#mybook").turn('next');
});
$(document).bind("zoom.swiperight", function (e) {
$("#mybook").turn('previous');
});
正如预期的那样,这将按顺序 1、2、3、4 翻页。
我的第二个代码无法正常工作:
$("#nextPg").click(function (e) {
e.turn($("#mybook").turn('next'));
});
$("#prvPg").click(function (e) {
$("#mybook").turn('previous');
});
这会在next
> 1,2,4,6,8(数字未正确递增)上打开这样的页面,但是在previous
< 6,5,4,3,2,1 上可以完美运行。
我可以绑定 document.bind(从 div 到我的“#nextPg”以获得与刷卡代码相同的效果。)