title: How to apply Local Storage to a to-do list
body: <p>I'm working on an app, and one section of this app is like a to-do list. The user can add and delete list-items.
  I've been trying to apply local storage to this list, but I can't do it.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;input type="text" id="entrada" placeholder="" /&gt;
  &lt;a href="#" data-role="button" id="agregar"&gt;Add&lt;/a&gt;
  &lt;ul id="list" data-role="listview"&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$('#agregar').on('click', function()
  {
  $('#agregar').on('click', function(event) { $('#entrada').val("")})
  
  var entrada = $('#entrada').val();
  if($("#entrada").val() == '')
  { return false; }
  $('#list').append( '&lt;li&gt;&lt;a hreft="#"&gt;'+entrada+&lt;'&lt;/a&gt;&lt;/li&gt;' );
  $('#list').listview( 'refresh' );
  }
  )
  </code></pre>