jQuery DataTables

HTML

<link rel="stylesheet" href="https://cdn.datatables.net/v/dt/dt-1.10.15/datatables.min.css">
<script src="https://cdn.datatables.net/v/dt/dt-1.10.15/datatables.min.js"></script>
<h3>jQuery DataTables</h3>
<a href="https://www.gyrocode.com/articles/tag/jquery-datatables/">See more articles about jQuery DataTables</a> on <a href="https://www.gyrocode.com/articles/">Gyrocode.com</a><hr>

<table id="example" class="display" cellspacing="0" width="100%">
    <thead>
        <tr>
            <th>Name</th>
            <th>Position</th>
            <th>Office</th>
            <th>Extn.</th>
            <th>Start date</th>
            <th>Salary</th>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <th>Name</th>
            <th>Position</th>
            <th>Office</th>
            <th>Extn.</th>
            <th>Start date</th>
            <th>Salary</th>
        </tr>
    </tfoot>
</table>

<hr><a href="https://www.gyrocode.com/articles/tag/jquery-datatables/">See more articles about jQuery DataTables</a> on <a href="https://www.gyrocode.com/articles/">Gyrocode.com</a>

JavaScript

$(document).ready(function (){
    var table = $('#example').DataTable({
        ajax: 'https://api.myjson.com/bins/qgcu',
        serverSide: true,        
        infoCallback: function(settings, start, end, max, total, pre){
   			return (!isNaN(total))
      			? "Showing " + start + " to " + end + " of " + total + " entries"
         		  + ((total !== max) ? " (filtered from " + max + " total entries)" : "")
      			: "Showing " + start + " to " + (start + this.api().data().length - 1) + " entries";
		}
        
    });
});