title: Backbone.js - instantiate Models/Views from exisiting html
body: <p>I've started looking at backbone.js today as a way to better organize the code in my application.</p>
  
  <p>I was wondering (conceptually - so reply with pseudocode by all means) how I would use my <strong>existing</strong> html to create Backbone Models (and Views).</p>
  
  <p>All of the tutorials I've found consist of using a blank html template and then injecting in the content using ajax. I don't want to do this.</p>
  
  <p>If I have a collection of books.</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html lang="en-US"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;My Book Collection&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;head&gt;
  
      &lt;/head&gt;
      &lt;body&gt;
          &lt;ul id="bookCollection"&gt;
              &lt;li class="book" data-book-id="1"&gt;&lt;input type="text" name="book_1_name" value="My Book A"/&gt;&lt;/li&gt;
              &lt;li class="book" data-book-id="2"&gt;&lt;input type="text" name="book_2_name" value="My Book B"/&gt;&lt;/li&gt;
              &lt;li class="book" data-book-id="3"&gt;&lt;input type="text" name="book_3_name" value="My Book C"/&gt;&lt;/li&gt;
              &lt;li class="book" data-book-id="4"&gt;&lt;input type="text" name="book_4_name" value="My Book D"/&gt;&lt;/li&gt;
              &lt;li class="book" data-book-id="5"&gt;&lt;input type="text" name="book_5_name" value="My Book E"/&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/body&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>At this stage I would like to start managing each book as a model, calling a function whenever book names are changed (just an alert in the function for proof of concept), and then calling a URL to sync changes to the model with my database.</p>
  
  <p>Can anyone point me in the right direction for a way to do the above using <strong><em>existing</em></strong> html on a page?</p>
  
  <p>If it makes a difference I plan on using mustache for my templating.</p>