Closed notfair closed 13 years ago
Free feel to adjust the setTimeout() in your code. It was more robust to have a timeout, because a lot of content tend to be load during $(document).read().
If you want iscroll to refresh itself, initialize it with the following might save you some code: checkDOMChanges: true
For example: var scroll = new iScroll(contentid, { desktopCompatibility: true, bounce: true, momentum: true, checkDOMChanges: true });
I want to know why it has nested 'setTimeout' function? The weird thing is when I use your example, the scroll everything was fine, but when I add in some content, the scroll no longer work, but if I reduce the nested 'setTimeout', then it can work.
Btw, how should I force refresh the scroll panel? using $(window).resize()?
I might have dynamic data come in therefore it is good to has a trigger for the scroll panel, how should I trigger the scroll.refresh? by using the pageAnimationEnd?