Closed hatpick closed 11 years ago
You need to delay instantiation of the scroller until all elements are in the DOM and the browser had a chance to layout and paint them. You could try something like:
// other stuff happens...
// elem is defined somewhere above
var iscroll;
setTimeout(function () {
iscroll = new iScroll(elem);
}, 50);
Beside all that, iScroll 4 is deprecated. Please use iScroll 5. There are AngularJS directives available from other developers you could use.
I follow the instructions in documentation and used iscroll.
in the directive I call the iScroll(elem). It creates the scoller but the problem is that scoller jumps back to the top when I try to scroll.
What I use: Adobe Cordova 3. AngularJS