scroll - iScroll jquery mobile plugin. Better to initiate this 50 times or turn touchmove even listener back on again? -
This is actually a common question for each scrollable area, to use iScroll with my mobile app , You have to start a new scroller:
If no devices are mounted by memory / CPU, there is no limit to the number of iScrolls. The type and length of content affects the number of ISCrols you can use together "
But I have 50 odd pages that require scrolling functionality. Using IScroller For this, I have to disable this event to touch:
document.addEventListener ('touchmove', function (e) {e.preventDefault ();}, false); I can reduce the amount of scrollers on just 4 if I (somehow!) Workout To enable touch event events on some pages I can.
Know what I want, do I want to improve and disable the TouchMov event, or better to start just 50 scrollers? ?
Thanks in advance.
The page on which you enable / disable You can use pagecreate to decide touchmove . To do this, copy per page Add: $ ('# myPageName'). Live ('pagecreate', function (event) {console.log ("about creating myPageName");}); Alternatively, you can capture the show / hide functionality of all the pages and there are some logic for those pages Can prepare. Read more.
Comments
Post a Comment