title: Javascript pagination
body: <p>Can someone help me please? I have little knowledge of JS... I tried <a href="https://stackoverflow.com/questions/1523163/jquery-pagination-plugin/1523265#1523265"> this</a> example, that brianpeiris wrote.. It worked nicely, but I need two different pagers in the same page. How can I accomplish this?</p>
  
  <p>This code doesn't work, but this is how far I got..</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
                      var pagination_options = {
                        num_edge_entries: 1,
                        num_display_entries: 8,
                        callback: pageselectCallback,
                        items_per_page:1
                      }
                      function pageselectCallback(page_index, jq){
                        var items_per_page = pagination_options.items_per_page;
                        var offset = page_index * items_per_page;
                        var new_content = $('#hiddenresult div.result').slice(offset, offset + items_per_page).clone();
                        $('#Searchresult').empty().append(new_content);
  
  
                        var items_per_page = pagination_options.items_per_page;
                        var offset = page_index * items_per_page;
                        var new_content = $('#hiddenresult2 div.result2').slice(offset, offset + items_per_page).clone();
                        $('#Searchresult2').empty().append(new_content);
                        return false;
  
                      }
  
  
                      function initPagination() {
                        var num_entries = $('#hiddenresult div.result').length;
                        // Create pagination element
                        $("#Pagination").pagination(num_entries, pagination_options);
  
                        num_entries = $('#hiddenresult2 div.result2').length;
                        // Create pagination element
                        $("#Pagination2").pagination(num_entries, pagination_options);                          
                      }
  
  
                      $(document).ready(function(){      
                        initPagination();
                      });    
  </code></pre>
  
  <p></p>