title: Data Persistence with jqMobi
body: <p>Well, I've sorted through the Google search and I've sorted through stack overflow and as of yet I don't have a good idea of how to do about this.</p>
  
  <p>I'd like to build a To Do program for the iphone using jqMobi + CSS + HTML 5.  I've worked with jQuery a bunch, spent some time with jQuery Mobile and have done tons of css and HTML, (though little work with HTML5).  What I need to be able to do is save lists that the user generates when they open up the program.</p>
  
  <p>I'm having no problem dynamically generating and linking pages... but when you open up the program a second time all of the pages (IE To Do Items) that I've generated disappear.  I understand that this is because they weren't written in as part of the base program.  It occurs to me that the way around this is to save those lists into a file or a DB and then load them when the program starts up.  </p>
  
  <p>I've seen documentation to do this using Titanium Studio, (it supports SQL lite) but the generation of pages and general UI suck.  Additionally getting an emulator to run from that code has given me a lot of trouble.  At least I can say that using appMobi's app to test gives you a decent emulator to work with before you've ported code to a compiled state.</p>
  
  <p>In any case, does anyone know how to set up data persistence (between program restarts) for jqMobi + CSS + HTML 5 with either a DB or file generation?</p>
  
  <p><b>EDIT x2:</b>
  Since I've got you on the hook @ian can you take a look a this code and tell me why the $.ui.addContentDiv() doesn't appear to be updating the content?  $(#content).append(string); doesn't appear to want to cooperate either.  Is there some function I need to call to make it refresh?  Stripped it down a bit still having issues.  Oddly enough the append to the list works just fine, but when I try to add that div layer it doesn't exist...</p>
  
  <p>code is as follows:</p>
  
  <pre><code>function genPage( id, list, parent ) {
      var content = '&lt;div id="' + id + '" class="panel"&gt;' + id + '&lt;/div&gt;';    
      var threadLink='&lt;li&gt;&lt;a href="#' + id +'"&gt;' + id + '&lt;/a&gt;&lt;/li&gt;';      
      $("#" + list).append(threadLink);
      $("#content").append(content);
  
      //$.ui.addContentDiv(id, content, id);
  }
  </code></pre>