Two jquery pagination plugin in the same page doesn't seem to work....

Posted by Pandiya Chendur on Stack Overflow See other posts from Stack Overflow or by Pandiya Chendur
Published on 2010-04-09T04:16:49Z Indexed on 2010/04/09 4:23 UTC
Read the original article Hit count: 288

Filed under:
|
|
|

I use jquery pagination plugin for paging... If there is one pagination plugin there is no problem for me... But if there is two one seems to work but the other doesn't seem too... Here is my code,

<div id="PagerUp" class="pager">

</div><br /><br /><br />
    <div id="ResultsDiv">

</div>
<div id="PagerDown" class="pager">

</div>

And my jquery has,

<script type="text/javascript">
         var itemsPerPage = 5;
         $(document).ready(function() {
             getRecordspage(0, itemsPerPage);
             var maxvalues = $("#HfId").val();
             $(".pager").pagination(maxvalues, {
                 callback: getRecordspage,
                 current_page: 0,
                 items_per_page: itemsPerPage,
                 num_display_entries: 5,
                 next_text: 'Next',
                 prev_text: 'Prev',
                 num_edge_entries: 1
             });
         });

</script>

Here is what i am getting...

alt text

Both works but Look at the pagerup the selected page is 3 but the PagerDown shows 1.... How to change one pager on other pagers callback event in jquery....

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about pagination