javascript - Jquery tablesorter pagination is not separating pages correctly on initial load -


so using pagination plugin tablesorter (tablesorter.com) , changed values in pagesize drop down box not correctly adjust pages unless click combo box again after page loads. if leave default values in (10,20,30) working correctly. load page , show 10 rows , allow me go next page rest of rows etc. need limit pages 100 results instead of 10. testing sake trying change limit 5 rows not adjusting correctly until click 5 in drop down after page loads. current code.

html

<div id="pager" class="pager"> <form>     <img src="images/first.png" class="first"/>     <img src="images/prev.png" class="prev"/>     <input type="text" class="pagedisplay"/>     <img src="images/next.png" class="next"/>     <img src="images/last.png" class="last"/>     <select class="pagesize">         <option value="5">5</option>         <option value="20">20</option>         <option value="30">30</option>       </select> </form> </div> 

javascript

<script>  $(document).ready(function()      {          $("#distributortable").tablesorter({ headers: { 1:{sorter:false} } } );         $("#distributortable").tablesorterpager({container: $("#pager")});       }  );  </script> 

i ended finding solution right after posting this. can send in value size when using pagination function set initial page size.

javascript

$("#distributortable").tablesorterpager({container: $("#pager"), size:5});  

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -