<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
</style>
<script src="js/jquery.min.js"></script>
<script language="JavaScript" type="text/javascript">
$(document).ready(function () {
$('#data').after('<div id="nav"></div>');
var rowsShown =3;
var rowsTotal = $('data tr').length;
var numPages = Math.ceil(rowsTotal/rowsShown);
for (var i = 0; i < numPages; i++)
{
var pageNum = i + 1;
$('#nav').append('<a href="#" rel="'+i+'">+pageNum+</a>');
}
$('#data tr').hide();
$('data tr:first').show();
$('#data tr').slice(0,rowsShown).show();
$('#nav a:first').addClass('active');
$('#nav a').bind('click',function () {
$('#nav a').removeClass('active');
$(this).addClass('active');
var currPage = $(this).attr('rel');
var startItem = currPage*rowsShown;
var endItem = startItem + rowsShown;
$('#data tr').css('opacity','0.0').hide().slice(startItem,
endItem).css('display','table-row').animate({opacity:1},300);
});
});
</script>
</head>
<body>
<table id="data">
<thead>
<th>fd</th>
<th>gfg</th>
<th>mn</th>
</thead>
<tbody>
<tr>
<td>545</td>
<td>768</td>
<td>987</td>
</tr>
<tr>
<td>545</td>
<td>768</td>
<td>987</td>
</tr>
<tr>
<td>545</td>
<td>768</td>
<td>987</td>
</tr>
<tr>
<td>545</td>
<td>768</td>
<td>987</td>
</tr> <tr>
<td>545</td>
<td>768</td>
<td>987</td>
</tr>
<tr>
<td>55</td>
<td>768</td>
<td>987</td>
</tr>
<tr>
<td>55</td>
<td>768</td>
<td>987</td>
</tr>
<tr>
<td>55</td>
<td>768</td>
<td>987</td>
</tr>
<tr>
<td>55</td>
<td>768</td>
<td>987</td>
</tr>
<tr>
<td>55</td>
<td>768</td>
<td>987</td>
</tr>
</tbody>
</table>
</body>
</html>