I downloaded iScroll.js and used in one of my phonegap projects i.e. < Pre> It also does not work on the normal browser, but when I inspect the elements then it is starting to work perfectly? Do not know what the problem is ... How to use iScroll 2 ) Start the iScroll object on DOMContentLoaded or Window Load. Change your code, Hope it helps. & lt; Script type = "application / javascript" src = "iscroll.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Var myScroll; Function load () {myScroll = new ISCOL ('wrapper'); } Document.addEventListener ('DOMContentLoaded', loaded, false); & Lt; / Script & gt;
1) Preventing the default behavior of standard touch events is easy to do by adding preventDefault () to your touchmove event
function loaded () {document.addEventListener ('touchmove', function (e) {e.preventDefault ();}); MyScroll = new ISCOL ('wrapper'); } Document.addEventListener ('DOMContentLoaded', loaded, false);
Comments
Post a Comment