NOTE!:

* If you have a different JSON format and need help with the processing code, please ask the question on StackOverflow or message me directly (gmail; wowmotty). Please don't open an issue for help with code.

Demo


1 2 3 4 5
1 2 3 4 5

Javascript


	

CSS

div.tablesorterPager {
  padding: 10px 0 10px 0;
  background-color: #D6D2C2;
  text-align: center;
}
div.tablesorterPager span {
  padding: 0 5px 0 5px;
}
div.tablesorterPager input.prev {
  width: auto;
  margin-right: 10px;
}
div.tablesorterPager input.next {
  width: auto;
  margin-left: 10px;
}
div.tablesorterPager input {
  font-size: 8px;
  width: 50px;
  border: 1px solid #330000;
  text-align: center;
}
#tablesorterPagerLoading {
  background: rgba(255,255,255,0.8) url(icons/loading.gif) center center no-repeat;
  position: absolute;
  z-index: 1000;
}
/*** css used when "updateArrows" option is true ***/
/* the pager itself gets a disabled class when the number of rows is less than the size */
.pager.disabled {
  display: none;
}
/* hide or fade out pager arrows when the first or last row is visible */
.pager img.disabled {
  /* visibility: hidden */
  opacity: 0.5;
  filter: alpha(opacity=50);
}

HTML

<!-- pager -->
<div class="pager">
  <img src="first.png" class="first"/>
  <img src="prev.png" class="prev"/>
  <span class="pagedisplay"></span> <!-- this can be any element, including an input -->
  <img src="next.png" class="next"/>
  <img src="last.png" class="last"/>
  <select class="pagesize">
    <option selected="selected" value="25">25</option>
  </select>
</div>

<table class="tablesorter">
  <thead>
    <tr>
      <th>1</th> <!-- thead text will be updated from the JSON; make sure the number of columns matches the JSON data -->
      <th>2</th>
      <th>3</th>
      <th>4</th>
      <th>5</th>
    </tr>
  </thead>
  <tfoot>
    <tr>
      <th>1</th> <!-- tfoot text will be updated at the same time as the thead -->
      <th>2</th>
      <th>3</th>
      <th>4</th>
      <th>5</th>
    </tr>
  </tfoot>
  <tbody> <!-- tbody will be loaded via JSON -->
  </tbody>
</table>

<div class="pager">
  <img src="first.png" class="first"/>
  <img src="prev.png" class="prev"/>
  <span class="pagedisplay"></span> <!-- this can be any element, including an input -->
  <img src="next.png" class="next"/>
  <img src="last.png" class="last"/>
  <select class="pagesize">
    <option selected="selected" value="25">25</option>
  </select>
</div>

Next up: Initializing tablesorter on a empty table ››