pagination example

Example 1: pagination html css how to working

<nav aria-label="...">
  <ul class="pagination">
    <li class="page-item disabled">
      <a class="page-link" href="#" tabindex="-1">Previous</a>
    </li>
    <li class="page-item"><a class="page-link" href="#">1</a></li>
    <li class="page-item active">
      <a class="page-link" href="#">2 <span class="sr-only">(current)</span></a>
    </li>
    <li class="page-item"><a class="page-link" href="#">3</a></li>
    <li class="page-item">
      <a class="page-link" href="#">Next</a>
    </li>
  </ul>
</nav>

Example 2: pagination.js

$('#demo').pagination({    dataSource: [1, 2, 3, 4, 5, 6, 7, ... , 195],    callback: function(data, pagination) {        // template method of yourself        var html = template(data);        dataContainer.html(html);    }})

Example 3: pagination

// input 
$page, $limit

// output
$offset = (($page - 1) * $limit);
$limit  = $limit;