Using jPageFlipper on the iPad?

Mar 3, 2013 at 4:40 AM
I opened the demo page on my ipad, and flipping pages from left to right (going from front to back of the book) works fine. However, when I tried to flip the pages back (going from back to front), the page lets me drag it, but doesn't flip to the next page. I am not sure why. Can you help?
Aug 12, 2013 at 7:24 AM
I noticed the same thing and run some debugs on the code and found out the following:

In jquery.pageFlipper.js somehwere around Line ~190 there seems to be a problem with some values:
var left = event.pageX - $(holder).position().left;
While on my Desktop PC, the values return correctly. On the iPad however event.pageX and $(holder).position().left; both returned solid 0 whenever I tried to flip a page. Thats why it works always to the left and never to the right, as the follwoing if statement always ends up for zero:
var actionDropArea = leftIsActive ? __left__ > options.pageWidth : __left__ < options.pageWidth;
However, I found a stackoverflow Thread talking about this:

I try to trace the bug deeper and implement a hotfix... but I'm not sure if I'm talented enough. Lets see...

If I dont return, I failed.

PS: I had to look up a bugmenot account to tell you this... bastards.
Aug 12, 2013 at 8:11 AM
Ok, I figured out how to rudimentary fix this bug, thanks to the stackoverflow post.

I'm just a lazy f*ck and just paste the code here. I marked the lines I added with an //hotfix so everyone can see what I did.
Basicly I store the coordinates of touchmove and use those instead of event.pageX when its a device that supports touch.

The code is too long to post here, so I hosted it on pastebin: 2p8qta8E

Greetings from Germany