I\'m using iScroll4 to create a horizontal scroll effect on an image within a mobile website. iScroll works fantastic, but the problem is the image contained in the iScroll wra
I've found the documentation to be terribly lacking as well but something like this works for me:
function swipeView(wrapper){
wrapper = new SwipeView('#wrapper', {
numberOfPages: pages.length
});
wrapper.onFlip(function(){
scroller = new iScroll('.swipeview-active', {
hScroll: false,
lockDirection: true
});
});
}
This initialises iScroll on your current SwipeView page upon swiping to it. Horizontal iScroll-scrolling is disabled which leaves that event available to SwipeView and the direction is locked so while a vertical (iScroll) swipe is in progress, a change in the user's swipe-direction won't swipe to the next SwipeView page. Without those options, one can do a bizarre horizontal swipe.