title: How to display saved localStorage data when a button is click?
body: <p>Good evening, i'm an amateur programmer trying to make simple jqm web apps. i have made a full CRUD and got it to save the form to local storage. Now the problem i'm having is displaying it. i would like it to display to my Home page; under an , when the save button is clicked. But How would i go about doing that? i'm stuck.</p>
  
  <pre><code>&lt;!--Home page--&gt;
   &lt;section data-role="page" id="home"&gt;
      &lt;header data-role="header"&gt;
          &lt;h1&gt;Counter&lt;/h1&gt;
      &lt;/header&gt;
  
      &lt;section&gt;   
      &lt;/section&gt;
  
      &lt;footer data-role="footer" data-position="fixed"&gt;
          &lt;nav data-role="navbar"&gt;
              &lt;ul&gt;
                  &lt;li&gt;&lt;a href="#home"&gt;&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#display"&gt;&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#app"&gt;&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/nav&gt;
      &lt;/footer&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>heres the js.</p>
  
  <pre><code>  //Store data function
       var storeData = function(key){
   var id = Math.floor(Math.random()*10000001);
  
      var item= {};
          item.Name=      ["Name:", $("#name").val()];
          item.category=      ["Type:", $("#category").val()];
          item.fav=   ["Favorite:", $("#fav").val()];
          item.comments=      ["Comments:", $("#comments").val()];
          localStorage.setItem(id, JSON.stringify(item));
          alert("Saved!");
          $.mobile.changePage("#add");
  </code></pre>
  
  <p>};</p>