I have created an app using phonegap, jquery mobile and iscroll with 3 scrolling divs, the first 2 scroll vertically and I am trying to get the third scrolling horizontally, but am having problems. The horizontal is working, as in letting me scroll to the right of the div, however, when i try to scroll further, the div jumps back to the start. I am hoping someone has encountered something similar and has a solution. My code looks like this;
var myScroll, myScroll2, myScroll3;
$(".scrollArea").live("pageshow", function() {
setTimeout(function(){myScroll = new iScroll('wrapper', {vScroll:true, hScroll:false});},0);
setTmeout(function(){myScroll2 = new iScroll('wrapper2', {vScroll:true, hScroll:false});},0);
setTimeout(function(){myScroll3 = new iScroll('wrapper3', {vScroll:false, hScroll:true});},0);
});
<div data-role="content">
<div id="wrapper3">
stuff here...
</div>
I have set the width of the wrapper to 1500px to test the scrolling, but this jumping error is driving me mad. Any help would be greatly appreciated.
please use jq.scroll.js from github it works for me. https://github.com/appMobi/jQ.Mobi/tree/master/plugins