I have this code :
//Pagination
pageSize = 8;
var pageCount = $(".line-content").length / pageSize;
for(var i = 0 ; i'+(i+1)+' ');
}
$("#pagin li").first().find("a").addClass("current")
showPage = function(page) {
$(".line-content").hide();
$(".line-content").each(function(n) {
if (n >= pageSize * (page - 1) && n < pageSize * page)
$(this).show();
});
}
showPage(1);
$("#pagin li a").click(function() {
$("#pagin li a").removeClass("current");
$(this).addClass("current");
showPage(parseInt($(this).text()))
});
.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