2-way-iScroll
2-way-iScroll copied to clipboard
Limiting number of pages dynamically does not work, alternative breaks vertical scrolling
I am using 2-way-iScroll successfully in (web)apps but got into an head-bumping issue when limiting the number of pages that can be swiped horizontally dynamically using AJAX.
- Removing pages dynamically does not work. I.e. when you hide a
<DIV>
and then perform a myScroll.refresh does not reduce the number of pages (i.e. there are 3 'page' DIVs in total of which I made 2 empty and they still show scrolling/swiping horizontally. Scrolling keeps working well both vertically and horizontally). - To resolve the issue (users should not see empty pages), I dynamically set the width of the wrapper, slider and pages on 320 pixels. However, with a swipe to the left (i.e. scrolling to page 2) the screen blocks (vertical scrolling impossible). Reloading the page or making a swipe to the right (i.e. try to go to page -1 so to speak) resets the page and makes vertical scrolling possible again. I tried for a significant number of hours to reproduce a right swipe or page refresh (and a myScroll.refresh) after a left swipe but this did give no solution. When the wrapper/slider and pages are reset to 768/3072/768 pix the multiple page 2-way-scrolling works normally again.
Any tip, workaround or update would be highly appreciated.