title: HTML Client side pagination - Cant get dynamically added data
body: <p>So I'm using a javascript pagination <a href="http://en.newinstance.it/2006/09/27/client-side-html-table-pagination-with-javascript/" rel="nofollow">http://en.newinstance.it/2006/09/27/client-side-html-table-pagination-with-javascript/</a> which works great.. except for when I try to load my dynamically added data (from a getJSON). The issue is that it is checking the table but not finding any results as it is injected into the innerHTML and not "hard-coded" in I guess.</p>
  
  <p>this is the javascript</p>
  
  <pre><code>script(type='text/javascript')    
      pager = new Pager('results', 3);
        pager.init();
        pager.showPageNav('pager', 'pageNavPosition');
        pager.showPage(1);   
  </code></pre>
  
  <p>Does anyone know what I can do to fix this? I've tried using some of the proper datagrid but I cannot get them to work with my application.</p>
  
  <pre><code>$.getJSON( '/getlocations', function( data ) {
          userListData = data;
  
          // For each item in our JSON, add a table row and cells to the content string
          $.each(data, function(){
              tableContent += '&lt;tr&gt;';
              tableContent += '&lt;td&gt;&lt;a href="#" class="linkshowuser" rel="' + this.name + '" title="Show Details"&gt;' + this.name + '&lt;/a&gt;&lt;/td&gt;';
              tableContent += '&lt;td&gt;' + this.information + '&lt;/td&gt;';
              tableContent += '&lt;td&gt;' + this.lat + '&lt;/td&gt;';
              tableContent += '&lt;td&gt;' + this.lon + '&lt;/td&gt;';
              tableContent += '&lt;td&gt;&lt;button onclick="viewLocationOnMap()"&gt;View on map&lt;/button&gt;&lt;/td&gt;';
              tableContent += '&lt;td&gt;In Progress&lt;/button&gt;&lt;/td&gt;';
              tableContent += '&lt;td&gt;&lt;a href="#" class="linkdeleteitem" rel="' + this._id + '"&gt;delete&lt;/a&gt;&lt;/td&gt;';
              tableContent += '&lt;/tr&gt;';
          });
  
          // Inject the whole content string into our existing HTML table
          $('#userList table tbody').html(tableContent);
  </code></pre>
  
  <p>Thanks</p>