I have this code :
//Pagination
pageSize = 8;
showPage = function(page) {
$('.line-content').hide();
$('.line-content:gt('+((page-1)*pageSize)+'):lt('+(page)*(pageSize-1)+')').show();
$('.line-content:eq('+((page-1)*pageSize)+')').show();
}
var pgs = Math.ceil($('.line-content').length/pageSize);
var pgnt = '';
for(var i=1;i<=pgs;i++){
pgnt += '- '+i+'
';
}
$('#pagin').html(pgnt);
$("#pagin li a").click(function() {
$("#pagin li a").removeClass("current");
$(this).addClass("current");
showPage(parseInt($(this).text()))
});
showPage(1);
.current {
color: green;
}
#pagin li {
display: inline-block;
}
1 I have some content
2 I have some content
3 I have some content
4 I have some content
5 I have some content
6 I have some content
7 I have some content
8 I have some content
9 I have some content
10 I have some content
11 I have some content
12 I have some content
This is inline to what you needed.