title: javascript document.ready not always working, iscroll !
body: <p>Hello we are building a mobile web.app using iScroll for scrolling. The problem is that the iScroll scroller sometimes has problems working when the page loads at first.</p>
  
  <p>This is the code, we added <code>(document).ready</code> to solve the problem, and it is doing it so mostly, but once in a while it doesn't seem to work.</p>
  
  <p>Our guess is that the scroller isn't working when the height of the wrapper (scrollable area) loads to slow, that's why we added the <code>document.ready</code> with the results stated as above.
  <a href="https://stackoverflow.com/">https://stackoverflow.com/</a></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
  var myScroll;
  $(document).ready(function loaded() {
      myScroll = new iScroll('wrapper');
  });
  
  $(document).ready.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
  
  $(document).ready.addEventListener('DOMContentLoaded', loaded, false);
  
  &lt;/script&gt;`
  </code></pre>
  
  <p>We'd appreciate some help !</p>
  
  <p>Thank you</p>