I have built a project using phonegap and jquery mobile, and have iscroll working perfectly on the first page. However on my second page iscroll isn't running. Can someone tell me how you initialize a jquery script on the page in JQM? I am new to both platforms and think it may be a simple mistake! Thanks
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- How to make that the snackbar action button be sho
checkDOMChanges: set to false to prevent auto refresh on DOM changes. If you switch off this feature you have to call iScroll.refresh() function programmatically every time the DOM gets modified. If your code makes many subsequent DOM modifications it is suggested to set checkDOMChanges to false and to refresh the iScroll only once (ie: when all changes have been done). Default true.
see more on there page:http://cubiq.org/iscroll
I never used phonegap, but im building a JQM-webapp as well, so i hope this works for you.
iScroll seems to cause several problems trying to implement it in JQM. This is why they came up with jquery.mobile.iscrollview which bascically adapts the iScroll javascript to the jQuery Mobile environment.
Just include the script and add
data-iscroll=""
to your div. And include all of your scripts in the given order.