title: ReferenceError: Can't find variable: $, jquerymobile + phonegap
body: <p>I'm a newbie. I want to save a value inputted by the user in the preferences manager, and have it automatically populate a field(if it has been filled by the user). I get a "ReferenceError: Can't find variable: $ at file:///android_asset/www/index.html:53" in my Android logcat. Also my app crashes. What am I doing wrong?</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;meta name="format-detection" content="telephone=no" /&gt;
      &lt;meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /&gt;
      &lt;!--&lt;link rel="stylesheet" type="text/css" href="css/index.css" /&gt;--&gt;
      &lt;link rel="stylesheet" type="text/css" href="css/jquery.mobile.structure-1.3.2.css" /&gt;
      &lt;link rel="stylesheet" type="text/css" href="css/jquery.mobile.theme-1.3.2.css" /&gt;
      &lt;link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.3.2.css" /&gt;
      &lt;title&gt;Hello World&lt;/title&gt;
  
      &lt;script type="text/javascript"&gt;
          document.addEventListener("deviceready", onDeviceReady, false);
  
          //once the device ready event fires up, you can safely do your thing
          function onDeviceReady(){
              //document.getElementById("welcomeMsg").innerHTML += "Phonegap is ready! version=";
          }
  
          $(function(){
              $('#savebutton').click(function(){
                  //this is where the user manually keys in values, do error checking here
                  window.localStorage.setItem("user_lat", $('#user_lat').val());
              });
  
              //called when the page is being shown
              $('#newpage').live('pageshow', function(){
                  var userLat = window.localStorage.getItem("user_lat");
                  if (userLat.length &gt; 0){
                      $('#user_lat').val(userLat);
                  }      
  
              });
          });
  
  
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="home" data-role="page"&gt;
          &lt;div data-role="header"&gt;
              &lt;h1&gt;Home Page&lt;/h1&gt;
          &lt;/div&gt;
          &lt;div data-role="content"&gt;
              Hola Phonegap &amp; Jquery mobile!
              &lt;a href="#newpage" data-role="button"&gt;Go to new page&lt;/a&gt;
          &lt;/div&gt;
          &lt;div data-role="footer" data-position="fixed"&gt;
              &lt;h4&gt;Footer&lt;/h4&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;!--2nd page--&gt;
      &lt;div id="newpage" data-role="page"&gt;
          &lt;div data-role="header"&gt;
              &lt;h1&gt;Manually specify your GPS coordinates&lt;/h1&gt;
          &lt;/div&gt;
          &lt;div data-role="content"&gt;
              &lt;label for= "user_lat"&gt;Latitude:&lt;/label&gt;
              &lt;input type="text" name="user_lat" id="user_lat" value=""/&gt;
              &lt;a id ="savebutton" href="" data-role="button"&gt;Save&lt;/a&gt;
          &lt;/div&gt;
          &lt;div data-role="footer" data-position="fixed"&gt;
              &lt;h4&gt;Footer&lt;/h4&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;script type="text/javascript" src="phonegap.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="js/jquery-1.10.1.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="js/jquery.mobile-1.3.2.js"&gt;&lt;/script&gt;        
  &lt;/body&gt;
  </code></pre>
  
  <p></p>