Paginate
Paginate copied to clipboard
Thanks
Nice and clean, thanks!
I have extended with some little functions, if you are interested:
This expose totalPages:
Paginate.prototype.pageCount = function () {
return (this.totalPages);
}
and this if you need interate over all pages:
Paginate.prototype.allPages = function () {
var all = [];
for (var i=1; i <= this.totalPages; i++ )
{
all.push(this.page(i));
}
return all;
}
ok, not very efficient... but very useful