title: iScroll - Uncaught ReferenceError: myScroll is not defined in index and Stale touch event ACTION_DOWN received from webcore
body: <p>I use iScroll in my levels page but somehow my editor complain ReferenceError in my index page (another page) which I didnt use iScroll. I search 'myScroll' in my index but there is no such word in my index. Because of the error, my iScroll that work in the browser does not work in the Android emulator.</p>
  
  <pre><code>09-04 08:31:06.249: E/Web Console(942): Uncaught ReferenceError: myScroll is not defined at file:///android_asset/www/index.html:1
  </code></pre>
  
  <p>If I swipe in the emulator, it produces</p>
  
  <pre><code>09-04 15:58:57.318: W/webview(3045): Stale touch event ACTION_DOWN received from webcore; ignoring
  </code></pre>
  
  <p>index.html (I didnt use iScroll)</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  
  &lt;title&gt;App Name&lt;/title&gt;
  &lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"&gt;
  &lt;link rel="stylesheet" href="css/jquery.mobile-1.0rc1.min.css" /&gt;
  &lt;link rel="stylesheet" href="css/style.css" /&gt;
  &lt;/head&gt;
  &lt;body&gt;        
  &lt;div id="mainContainer" data-role="page" &gt;
  &lt;div data-role="content"&gt;
      &lt;div id="homeLinks"&gt;
      &lt;img id="icon" src="css/images/icon.png"&gt;
      &lt;p&gt;&lt;a href="#level" data-role="button" data-theme="a"&gt;level&lt;/a&gt;&lt;/p&gt;
  
      &lt;/div&gt;   
    &lt;/div&gt;        
  &lt;/div&gt;
  &lt;script src="js/jquery.js"&gt;&lt;/script&gt;
  &lt;script src="js/jquery.mobile-1.0rc1.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" charset="utf-8" src="js/cordova-1.7.0.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>level page (page I used iScroll)</p>
  
  <pre><code>&lt;div data-role="page" data-add-back-btn="true" &gt;
  &lt;header data-role="header"&gt;  
      &lt;a href="settings.html" data-icon="gear" data-theme="b" class="ui-btn-right"&gt;Settings&lt;/a&gt;  
      &lt;h1&gt;Study Levels&lt;/h1&gt;  
  &lt;/header&gt;
  &lt;div id="level1" data-role="content"&gt;
      &lt;div id="wrapper"&gt;
          &lt;div id="scroller"&gt;
               &lt;ul id="thelist"&gt;
                    &lt;li&gt;&lt;img src="css/images/level1.png"/&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;img src="css/images/level2.png"/&gt;&lt;/li&gt;
                    &lt;li&gt;zz&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
  &lt;/div&gt;      
  
  &lt;footer data-role="footer" data-position="fixed" data-tap-toggle="false"&gt;
      &lt;div id="nav"&gt;
        &lt;div id="prev" onclick="myScroll.scrollToPage('prev', 0);return false"&gt;&amp;larr; prev&lt;/div&gt;
        &lt;ul id="indicator"&gt;
          &lt;li class="active"&gt;1&lt;/li&gt;
          &lt;li&gt;2&lt;/li&gt;
          &lt;li&gt;3&lt;/li&gt;
        &lt;/ul&gt;
        &lt;div id="next" onclick="myScroll.scrollToPage('next', 0);return false"&gt;next &amp;rarr;&lt;/div&gt;
      &lt;/div&gt;
  &lt;/footer&gt;   
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;script src="js/jquery.js"&gt;&lt;/script&gt;
  &lt;script src="js/jquery.mobile-1.0rc1.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" charset="utf-8" src="js/cordova-1.7.0.js"&gt;&lt;/script&gt;
  &lt;script src="js/ender.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="iscroll-lite.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" charset="utf-8"&gt;
           $(document).ready(function () {
  
          this.myScroll = $('#wrapper').iScroll({
          snap: true,
          momentum: false,
         hScrollbar: false,
          onScrollEnd: function () {
            document.querySelector('#indicator &gt; li.active').className = '';
            document.querySelector('#indicator &gt; li:nth-child(' + (this.currPageX+1) + ')').className = 'active';
          }
          })
      })
   &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>