I’d like to get the same behaviour of the native javascript scrollTo function in iPad, just attaching a function to the swipe event and scrolling the content a specific number of pixels. That doesn’t work in iPad using scrollTo or several different jquery plugins, like scrollTo or iScroll.
I think I’m having problems because I’m working with an iframe, as I have another html document in it, with its body divided in columns, but I’m just showing the first one. The point of all this is that, after swiping, it should show the next/prev column, and I tried scrolling the iframe window or the inner’s html body, which actually works in chrome, but it doesn’t in iPad.
I’d like to get the same behaviour of the native javascript scrollTo function in
Share
I solved the problem, but following another approach. Instead of scrolling the iframe window or the body within the iframe wit javascript, I dynamically change the css3 transform property (-webkit-transform in this case):
where leftpos is the pixel (negative) where I want to locate the document.