title: Paginating from multiple div classes
body: <p><strong>MAJOR EDIT</strong></p>
  
  <p>So I have it working now, well, sort of.  I needed to use the AJAX example from the jQuery Pagination Plugin with a jQuery.noConflict statement.  Here is the code:</p>
  
  <pre><code>            jQuery.noConflict()(function($){
          function pageselectCallback(page_index, jq){
              var new_content = $('#hiddenresult div.result:eq('+page_index+')').clone();
              $('#Searchresult').empty().append(new_content);
              return false;
          }
  
          /** 
           * Callback function for the AJAX content loader.
           */
          function initPagination() {
              var num_entries = $('#hiddenresult div.result').length;
              // Create pagination element
              $("#Pagination").pagination(num_entries, {
                  num_edge_entries: 2,
                  num_display_entries: 8,
                  callback: pageselectCallback,
                  items_per_page:1
              });
           }
  
          // Load HTML snippet with AJAX and insert it into the Hiddenresult element
          // When the HTML has loaded, call initPagination to paginate the elements        
          $(document).ready(function(){      
              $('#hiddenresult').load('snippet.html', null, initPagination);
          });
          });
  </code></pre>
  
  <p>This is working well, it loads a snippet while it waits for the JSON to be passed to the page.  My problem now is I can change the pagination options.  The default shows only three results.  I want to show 10 results per page.  If I try and change the items_per_page the pagination disappears and only the snippet result shows. Is it possible to show 10 and paginate?  What happens if there are less that 10 results?</p>
  
  <p>Thanks in advance!</p>
  
  <p><strong>ORGINAL QUESTION</strong></p>
  
  <p>So this is another n00b question and I am not sure if the best way to do this will be using PHP or jQuery?  I can at least read jQuery, even if my writing of it is basically non-existant, but my PHP understanding is getting much better, again, no writing though.  </p>
  
  <p>Basically I have a JSON object that is being converted to a 'list' of div class items within an overall div id wrap.  I need to be able to paginate the results.  The example I have here is only 10 items but I have one object that is returning 250 items. </p>
  
  <p>The jQuery returning the JSON is working spot on, now just to get it to paginate within the same page.</p>
  
  <p>Currently the HTML output looks like this:</p>
  
  <pre><code>&lt;body&gt;
  &lt;div class="container"&gt;
    &lt;div id="dealer_limpopo"&gt;
      &lt;div class="dealer"&gt;
          &lt;dl&gt;
              &lt;dt&gt;
                  Company Name
              &lt;/dt&gt;
              &lt;dd&gt;
                  Cable-Tech
              &lt;/dd&gt;
              &lt;dt&gt;
                  Company Description
              &lt;/dt&gt;
              &lt;dd&gt;
                  Computer &amp;amp; Software Sales Licensing Network Infrasture Solutions
              &lt;/dd&gt;
              &lt;dt&gt;
                  Email Address
              &lt;/dt&gt;
              &lt;dd&gt;
                  Isaacm@cable-tech.co.za
              &lt;/dd&gt;
              &lt;dt&gt;
                  Contact Number
              &lt;/dt&gt;
              &lt;dd&gt;
                  084 688 9457
              &lt;/dd&gt;
              &lt;dt&gt;
                  Website URL
              &lt;/dt&gt;
              &lt;dd&gt;
                  http://www.cable-tech.co.za
              &lt;/dd&gt;
              &lt;dt&gt;
                  City
              &lt;/dt&gt;
              &lt;dd&gt;
                  Polokwane
              &lt;/dd&gt;
              &lt;dt&gt;
                  Physical Address
              &lt;/dt&gt;
              &lt;dd&gt;
                  Factory 39/No.06, Freedom Drive, Industrial Area, Seshego, 0742
              &lt;/dd&gt;
          &lt;/dl&gt;
      &lt;p&gt;&lt;/p&gt;
      &lt;/div&gt;
      &lt;div class="dealer"&gt;
                   .....
      &lt;/div&gt;
      &lt;div class="dealer"&gt;
                   .....
      &lt;/div&gt;
      &lt;div class="dealer"&gt;
                   .....
      &lt;/div&gt;
      &lt;div class="dealer"&gt;
                   .....
      &lt;/div&gt;
      &lt;div class="dealer"&gt;
                   .....
      &lt;/div&gt;
      &lt;div class="dealer"&gt;
                   .....
      &lt;/div&gt;
      &lt;div class="dealer"&gt;
                   .....
      &lt;/div&gt;
      &lt;div class="dealer"&gt;
                   .....
      &lt;/div&gt;
      &lt;div class="dealer"&gt;
                   .....
      &lt;/div&gt;
      &lt;div class="dealer"&gt;
                   .....
      &lt;/div&gt;
      &lt;/div&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>You can see the page live at <a href="http://thegearbox.co/thisisatest/" rel="nofollow">http://thegearbox.co/thisisatest/</a></p>
  
  <p>The question is? How does one paginate the results?  I have tried to use <a href="https://github.com/gbirke/jquery_pagination" rel="nofollow">jQuery Pagination Plugin</a> but I really can't get around the script in there?  </p>
  
  <p>I really am just starting out learning scripting and other client side languages... Got tossed in the deep end a little though, so any help would be massively appreciated.</p>
  
  <p>Thanks!!</p>